(data grid) is there a good workaround for obtaining other column values in FillInData for a Data Grid Table?

Trevor DeVore lists at mangomultimedia.com
Wed Aug 18 09:21:59 EDT 2010


On Aug 17, 2010, at 10:52 PM, Mike Bonner wrote:

> If you set a custom behavior for the column you want the sum in, and
> where it has the section for filling data, put
>
>   put the dgDataOfIndex[ the dgIndex of me] of the dgControl of me
> into theDataA
>   set the text of field 1 of me to (theDataA["Col 2"] +  
> theDataA["Col 3"])
>
> Should work fine. Not positive this is the best method, but seems to
> work dandy fine with small datasets.  Haven't tried it with big ugly
> datasets.

If you didn't want to fetch all of the data for the entire row you  
could use GetDataOfIndex. GetDataOfIndex only retrieves the value of a  
specific column.

put the dgIndex of me into theIndex
set the text of field 1 of me to (GetDataOfIndex(theIndex, "Col 2") +  
GetDataOfIndex(theIndex, "Col 3"))

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the Use-livecode mailing list