This presumes you "know" what the line should be. If you want the data from a 
selected line, use the dgHilitedLine(s) to get the line number(s), or as I 
always like to do, use dgHilitedIndex because they remain constant even after a 
sort. dgHilitedLine refers to the visible rows (plus a couple buffer rows I 
understand). dgHilitedIndex refers to any record in the dg data array. The 
index number will remain constant even after a sort (but not of course after 
setting the dgText or dgData). 

So if you were looping through all the visible records, use line. If through 
all the records in the data grid, use index. 

Bob


On Dec 8, 2011, at 6:47 AM, Mike Bonner wrote:

> Hey cool. Didn't occur to me to ignore the built in function and grab it
> directly.  Haven't tried it but would sure simplify nicely. Thx!
> 
> On Thu, Dec 8, 2011 at 7:41 AM, <dunb...@aol.com> wrote:
> 
>> 
>> Hi.
>> 
>> Why not just:
>> 
>> on mouseUp
>> get the dgDataOfLine[2] of grp "yourDG"
>> combine it with return and tab
>> answer it
>> end mouseUp
>> 
>> Craig Newman
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to