[DataGrid] replacing the values of a selected Line with new ones

Trevor DeVore lists at mangomultimedia.com
Tue Jul 14 08:22:04 EDT 2009


On Jul 13, 2009, at 10:44 AM, Andre.Bisseret wrote:

> This works but
>
> QUESTION 1: Is it possible to simplify this script ? and, could it  
> be a simpler way to get the values of a line of the datagrid ? (I  
> mean something like "get the dgTextOfLine[theLine] of group  
> "dataGrid")

dgDataOfIndex/dgDataOfLine and GetDataOfIndex are the only ways to get  
data from a particular row.

> ...
> This works but
>
> QUESTION 2 : is this the simpler way to repopulate the selected  
> line ? or is it possible to directly change (or replace) the content  
> of the selected line ? Again, my first idea would be something like  
> set the dgTextOfLine[theLine]

You can set the dgDataOfIndex/dgDataOfLine. Here are lessons that  
discuss getting/setting data for a row:

How Do I Get Data Associated With a Row?: <http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagrid/lessons/3641-How-Do-I-Get-Data-Associated-With-a-Row- 
 >

How Do I Update Data In a Row?: <http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagrid/lessons/5434-How-Do-I-Update-Data-In-a-Row- 
 >

> I am learning the use of the dataGrid (that I like a lot :-)) and,  
> in the same time, the use of arrays (that I do not like so much  
> yet ;-)))

Even if arrays are a little confusing at first they are your friend :-)

Regards,

-- 
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com



More information about the use-livecode mailing list