I have been reading the Datagrid API but still seek enlightenment. I have a standard datagrid table that allows the user to sort the rows by selecting the column headings. I wish to extract the data in the same order as it is being displayed. The simple answer is to use the dgText[true] command which returns a TSV copy of the data in the display order with headings.
Code: Select all
put the dgText[true] of group "dgNotes" into tData -- TSV in display order
However, the API implies that the dgText command is for wimps "in the interest of making life easier for some folks there is the dgText property". So real non-folksy (is that a word?) programmers use the dgData property.
Code: Select all
put the dgData of group "dgNotes" into tDataA
The property "sort by column" returns the column being used to sort the data but it does not return the sort direction i.e. ascending / descending and I cannot find a property that does return the direction.
Code: Select all
put the dgProp["sort by column"] of group "dgnotes" into tSortCol