Sorting datagrid column with a tricj?
bobsneidar at iotecdigital.com
Fri Nov 2 17:42:37 EDT 2018
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 displayed data.
I have a similar issue with SQL formatted dates, but I want to display them as long dates. I'll toy around with this and see what I come up with.
> On Nov 2, 2018, at 14:26 , Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi Bob,
>> Am 02.11.2018 um 22:14 schrieb Bob Sneidar via use-livecode <use-livecode at lists.runrev.com>:
>> 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.
> I was afraid of that.
>> If you want to force the sort when you populate the datagrid, then set the dgProp ["sort by column"] of the datagrid to the column you want, and then if the user sorts by a different column, well that's on them.
> We have a german app for Android and LC on Android still does not support "system date"! :-/
> So I wanted to fake sorting a column with long german dates by sorting by a hidden column with an english date.
> Will have to roll my own with list fields.
> Thank you!
>> Bob S
> Klaus Major
> klaus at major-k.de
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode