Re: Sorting datagrid column with a tricj?

2018-11-05 Thread Bob Sneidar via use-livecode
Hi Trevor. Actually I came up with a fairly elegant solution which is quite simple. In the column behavior script I added some code: on FillInData pData -- This message is sent when the Data Grid needs to populate -- this template with the column data. pData is the value to be displayed.

Re: Sorting datagrid column with a tricj?

2018-11-05 Thread Trevor DeVore via use-livecode
On Mon, Nov 5, 2018 at 11:03 AM Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Trevor. > > Just a heads up, I followed those instructions in the lesson to the > letter. It broke my datagrid. It would no longer populate and I could not > select a row by clicking on it. >

Re: Sorting datagrid column with a tricj?

2018-11-05 Thread Bob Sneidar via use-livecode
I think at some point the way this needs to work is to send fillInData message to the script of the datagrid. Most LC devs see the datagrid as a complex magical black box kind of object, and are reticent to pull it apart or copy bits of it to other places to get it to do something different.

Re: Sorting datagrid column with a tricj?

2018-11-05 Thread Bob Sneidar via use-livecode
Hi Trevor. Just a heads up, I followed those instructions in the lesson to the letter. It broke my datagrid. It would no longer populate and I could not select a row by clicking on it. It may have to do with the new dg behavior heirarchy. I could see that someone else was having difficulty

Re: Sorting datagrid column with a tricj?

2018-11-04 Thread Bob Sneidar via use-livecode
Thanks Trevor. I perused the lessons and the documentation but could not find anything that might aid me in this. I will have a look at that lesson! Bob S > On Nov 2, 2018, at 15:49 , Trevor DeVore via use-livecode > wrote: > > On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode <

Re: Sorting datagrid column with a tricj?

2018-11-03 Thread Klaus major-k via use-livecode
Hi Bob, > Am 02.11.2018 um 22:42 schrieb Bob Sneidar via use-livecode > : > > In a table datagrid, can't you edit the column template so that you can > control what goes into the field for that column? I think the underlying data > will remain the same, but what goes into the field is what

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Trevor DeVore via use-livecode
On Fri, Nov 2, 2018 at 5:16 PM Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > > What I would like to see added to the datagrid is a handler that > intercepted the population of a field so what goes into the field can be > custom formatted. This comes up a lot. Dates and

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Bob Sneidar via use-livecode
Okay, looks like this is a no go. I read from one of the datagrid lessons in reference to populating the datagrid "by hand": Important: When using this technique properties like dgData, dgText, dgDataOfIndex, etc. will no longer return values. The data grid is just displaying records from

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Bob Sneidar via use-livecode
In a table datagrid, can't you edit the column template so that you can control what goes into the field for that column? I think the underlying data will remain the same, but what goes into the field is what you put there. I suspect the datagrid will then sort by the underlying data, not the

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Klaus major-k via use-livecode
Hi Bob, > Am 02.11.2018 um 22:14 schrieb Bob Sneidar via use-livecode > : > > There is no way I know of to have a datagrid sort by an invisible column and > still show that it is sorted by a visible one. Every time the datagrid > "redraws" it's going to update the appearance of the header to

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Bob Sneidar via use-livecode
There is no way I know of to have a datagrid sort by an invisible column and still show that it is sorted by a visible one. Every time the datagrid "redraws" it's going to update the appearance of the header to reflect the sort. If you want to force the sort when you populate the datagrid,

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Klaus major-k via use-livecode
> Am 02.11.2018 um 21:27 schrieb Klaus major-k via use-livecode > : > > Hi all, > >> Am 02.11.2018 um 21:13 schrieb Klaus major-k via use-livecode >> : >> >> Hi all, >> >> given a datagrid (table) with three columns >> C1 -> visible >> C2 -> visible >> C3 -> invisible column >> >> Is it

Re: Sorting datagrid column with a tricj?

2018-11-02 Thread Klaus major-k via use-livecode
Hi all, > Am 02.11.2018 um 21:13 schrieb Klaus major-k via use-livecode > : > > Hi all, > > given a datagrid (table) with three columns > C1 -> visible > C2 -> visible > C3 -> invisible column > > Is it possible to sort a datagrid by column C3, although > the user has clicked the header of

Sorting datagrid column with a tricj?

2018-11-02 Thread Klaus major-k via use-livecode
Hi all, given a datagrid (table) with three columns C1 -> visible C2 -> visible C3 -> invisible column Is it possible to sort a datagrid by column C3, although the user has clicked the header of column C2. Know what I mean? If this is possible, any hints on how to do this are highly