Sorting a datagrid
Posted: Tue Mar 01, 2011 3:20 am
I am trying to set up a button to sort the lines of a datagrid. The following is part of the script:
put orgchoice&"data" into thegroup ## orgchoice is a global variable, previously assigned
put orgchoice & " chq list" into thecard
put the dgtext of group thegroup of card thecard into dataset
sort lines of dataset numeric by word 1 of each
set the dgtext of group thegroup of card thecard to dataset
When I work with this in the message box, putting line 1 of dataset returns the correct line, but the datagrid is not being changed, ie the line I test is not the same as the line from dataset. Have I messed up the syntax somewhere?
Thanks, Dave
put orgchoice&"data" into thegroup ## orgchoice is a global variable, previously assigned
put orgchoice & " chq list" into thecard
put the dgtext of group thegroup of card thecard into dataset
sort lines of dataset numeric by word 1 of each
set the dgtext of group thegroup of card thecard to dataset
When I work with this in the message box, putting line 1 of dataset returns the correct line, but the datagrid is not being changed, ie the line I test is not the same as the line from dataset. Have I messed up the syntax somewhere?
Thanks, Dave