DataGrid AddData issue
Trevor DeVore
lists at mangomultimedia.com
Mon Mar 15 12:05:17 EDT 2010
On Mar 12, 2010, at 11:21 PM, Jeffrey Massung wrote:
> It looks like AddData doesn't instantly add the data to a DG form
> (haven't tried a table).
AddData does add the data to the form immediately.
> So, for example, if I were to do the following:
>
> ## inside the DG group control
>
> on doSomething
> -- .. construct some data ..
>
> addData tData
>
> get the dgNumberOfLines of me
> get the dgDataControlOfIndex[it] of me
You are getting the line count but then passing the line count to a
property that requires an index.
After calling addData the result will contain the new index (see
example: http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7314-How-Do-I-Add-A-Row-Of-Data-To-An-Existing-Data-Grid-)
.
AddData tData
put the result into theNewIndex
get the dgDataControlOfIndex[theNewIndex] of me
Try that and see if it works for you.
--
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