getting info from a Data Grid - which out of three methods is best?

Josh Mellicker josh at dvcreators.net
Fri Apr 9 02:54:06 EDT 2010


Thanks!!!

On Apr 8, 2010, at 6:31 AM, Trevor DeVore wrote:

> On Apr 7, 2010, at 5:03 PM, Josh Mellicker wrote:
> 
>> Would you:
>> 
>> 1. scan the grid line by line, trying for a value match with data grid commands?
>> 
>> 2. get the dgData and loop through the array?
>> 
>> 3. get the dgText and loop through the tab delimited data?
>> 
>> (NOTE: We can't really depend on the "filter" command, since it's conceivable columns could change order or position in the future.)
> 
> Grab the dgData and loop through it.
> 
> put the dgData of group "MyGrid" into theDataA
> 
> repeat for each key theIndex in theDataA
> ... perform find on theDataA[theIndex]["firstName"], etc.
> end repeat
> 
> Note that the above will not loop through the records in the order they appear but that may or may not matter to you. In the end you have the index (theIndex variable) that you can use in the Data Grid API.
> 
> If you want to loop through the records in order then follow the example in the lesson on exporting data.
> 
> How Do I Export Data From A Data Grid?: <http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7323-How-Do-I-Export-Data-From-A-Data-Grid->
> 
> -- 
> Trevor DeVore
> Blue Mango Learning Systems
> ScreenSteps: http://www.screensteps.com
> Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list