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

zryip theSlug zryip.theslug at gmail.com
Wed Aug 18 16:19:21 EDT 2010

On Wed, Aug 18, 2010 at 4:15 AM, Josh Mellicker <josh at dvcreators.net> wrote:
> Let's say you had a data grid table with three columns, and you wanted the first column to be the sum of the other two, like this:
> 10      7       3
> 5       2       3
> 7       4       3
> How would you calculate the first column while the table is filling in?
> ---
> Originally, we looped through the data and did the calculations, then put the data into the data grid. Now the data set is getting so large that this is too slow, looping through once to calc, then again for the grid. So we're thinking doing the calculation in FillInData would be more efficient. If possible.
> It's easy to find any field value in a Data Grid form, since pData is an array with the row values, but we'd like to avoid switching to a form._______________________________________________

I have just upload an experiment stack in the Slug's website:

The experiment shows how doing a sum of three columns in a column of a
data grid:
- when the dg is filling in
- when you change a value in one of the three columns.

The stack using a custom column behavior. You can access to the script
by clicking on the edit script button.


-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list