Bonjour,

I searched for a solution in case you don't know the number of the line
I tested the following script (in a button) :

  local tIndex,tLineData,tName,tLine
   ------------
on mouseUp
   ask "Which symbol?"
   if the result is "cancel" then exit mouseUp
   put it into tSymbol
   dispatch "FindIndex" to grp "datagrid" with "Symbol",tSymbol
   put the result into tIndex
   if tIndex > 0 then
      put the dgDataOfIndex[tIndex] of grp "datagrid" into tLineData
put tLineData["Securities"] into fld "fldResult" -- or into a variable, or whatever else
   else
      answer "There is no such symbol"
   end if
end mouseUp

This might be done with FindLine and dgDataOfLine as well (instead of FindIndex and dgDataOfIndex)

I tried to find a solution in case there might be several identical "symbols" in column 2, but without any success! (yet ;--))

Thanks Joe, for the training :-))

Best regards from Grenoble

André

Le 15 mai 10 à 22:48, zryip theSlug a écrit :

2010/5/15  <[email protected]>:
Hi Everyone

First of all thanks to Zryip for the answer to my last grid question. Now
that problem is solved, but I have another.

You're welcome ;)

I have a dataGrid with 8 columns and 1000 rows. Knowing the data of a line of column 2, I need to retrieve the data of column 1 of that line. I don't want to change anything in the dataGrid while doing this. How is this best accomplished? If it helps Column 1 is titled Securities and column 2 is titled
Symbol.

Assuming that you know the number of the line, a possible way is to
read the data of the line, then read the content of the column
securities, like this:

put the dgDataOfLine[tTheLine] of tMyDataGrid into tTheDataA
put tTheDataA["securities"] into tTheValueOfColumn1


Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to