select all rows in DG table via script?

Klaus on-rev klaus at major.on-rev.com
Tue Apr 17 13:33:04 EDT 2012


Hi Bob,

Am 17.04.2012 um 19:12 schrieb Bob Sneidar:

> 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.

thanks, but Peters solutions works just great :-)

> 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.

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com





More information about the use-livecode mailing list