If I put the following command in the openCard event of a card:
dispatch "SortDataByKey" to group "DataGrid 1" with "Port Date", "datetime", "ascending"
When the card is finished opening, DataGrid 1 is sorted in ascending order of the column "Port Date"
However, if the last time the card had been open it had been sorted by the field "Value", the heading of the column "Value" would still appear as dark grey with the tick mark showing direction of sort for "Value" even though the actual sort was on "Port Date".
Is there a parameter that I am missing or another command that can be given to the header to make it reflect the sort that was done under program control?
Regards,
Larry
Sort of a data grid under program control
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Sort of a data grid under program control
Yes. Add :lohill wrote: Is there a parameter that I am missing or another command that can be given to the header to make it reflect the sort that was done under program control?
Code: Select all
set the dgProp["sort by column"] of group "DataGrid 1" to "Port Date"
Re: Sort of a data grid under program control
Thanks bangkok!
Larry
Larry