select all rows in DG table via script?

Bob Sneidar bobs at twft.com
Tue Apr 17 13:12:25 EDT 2012


It's about this time I begin to ask myself, "Am I going about this the right way?" For my part, just having a user click on a record and hilite it doesn't seem like it's enough. I have an edit mode and a browse mode, and in browse mode a user can still select a row in a datagrid, even though it doesn't mean anything in that mode. I could disable the datagrid in browse mode, but that seems visually wrong too. 

What I did to solve this is I made a group of checkboxes the exact number of rows of my datagrid, and then wrote scripts to check and uncheck them based on a hidden column in the datagrid data. The checkboxes are not a part of the datagrid, although interacting with them does set the value of the hidden checked column in the associated row of the datagrid data.  I hide this in browse mode and show it in edit mode. 

I can send you the scripts I use to control them if you like.

Bob


On Apr 17, 2012, at 9:40 AM, Peter Haworth wrote:

> ---------- Forwarded message ----------
> From: "Peter Haworth" <lcsqlpete at gmail.com>
> Date: Apr 17, 2012 9:34 AM
> Subject: Re: select all rows in DG table via script?
> To: "How to use LiveCode" <use-livecode at lists.runrev.com>
> 
> There has to be a better way but you could set the dghilitedlines to a
> comma separated list of every line number from 1 to the dgnumberofrecords.
> _______________________________________________
> 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