Reading the First Line of a DataGrid

Peter Haworth pete at lcsql.com
Wed Oct 3 01:39:03 EDT 2012


I'm a bit rusty on datagrids but shouldn't it be dghilitedline?
On Oct 2, 2012 9:40 PM, "Mark Stuart" <mfstuart at cox.net> wrote:

> 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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list