Reading the rev-list, I found a reference to: dispatch "selectionChanged" to grp "DataGrid" with var
Notice the with var So I've modified my command to: put the dgHilitedIndex of grp "DataGrid" into firstLineNum dispatch "selectionChanged" to grp "DataGrid" with firstLineNum This passes the DataGrid index to the selectionChanged and allows the dataArray of the DataGrid to be fetched successfully. This doesn't matter how the user has sorted the DataGrid. Thanx for your help Bob and Peter. Regards, Mark Stuart _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode