Reading the First Line of a DataGrid
Mark Stuart
mfstuart at cox.net
Wed Oct 3 00:40:49 EDT 2012
Hi all,
I'm trying to get the first line of a loaded DataGrid to be selected.
At the end of the script that loads the DataGrid, I have the following 2
lines:
set the dgLine of grp "DataGrid" to 1
send "selectionChanged" to grp "DataGrid"
I've also tried:
set the dgLine of grp "DataGrid" to 1
dispatch "selectionChanged" to grp "DataGrid"
This really isn't selecting the line at all.
How do I know, because in the selectionChanged handler of the DataGrid I'm
using the answer command to display the arguments of the handler:
HilitedIndex and PrevHilitedIndex.
These values are empty using:
answer "HilitedIndex:" && HilitedIndex & cr & "PrevHilitedIndex:" &&
PrevHilitedIndex
So how do I get the first line of a DataGrid to be selected?
Regards,
Mark Stuart
More information about the use-livecode
mailing list