Hello everybody,
i have created a simple Data Grid with two Colums. There are several lines of text in the Data Grid. My user should select one of the shown Rows. I want to get the data of a selected row in a variable.
I have done this in a scrolling field with this code (here it is simple!):
"put the selectedtext of field "artikelportal" into gAnzeige_artikel"
It would be great, if anybody could tell me, how i can do this action in a Data Grid!!!!
thanks
Jochen
Getting selected text of a Data Grid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Getting selected text of a Data Grid
I think you'll find the answer you're looking for here:
Create, Read, Update, Delete Example
Create, Read, Update, Delete Example
Re: Getting selected text of a Data Grid
Jochen, check out the lesson here for the datagrid: http://lessons.runrev.com/s/lessons/m/d ... -or-column
I think this will get you pointed the right direction.
I think this will get you pointed the right direction.
Jayare wrote:Hello everybody,
i have created a simple Data Grid with two Colums. There are several lines of text in the Data Grid. My user should select one of the shown Rows. I want to get the data of a selected row in a variable.
I have done this in a scrolling field with this code (here it is simple!):
"put the selectedtext of field "artikelportal" into gAnzeige_artikel"
It would be great, if anybody could tell me, how i can do this action in a Data Grid!!!!
thanks
Jochen
Re: Getting selected text of a Data Grid
I found this in the doUpdate handler. I think that's what you're looking for.
Code: Select all
put the dgHilitedLines of group "mygrid" into theLine --grabs hilited line
put the dgDataOfLine[theLine] of group "mygrid" into theDataA
-- theDataA is now an array variable.
-- then you get the specific column values by using the column names
put theDataA["Handle"] into myHandle
put theDataA["Entry"] into myEntry
Re: Getting selected text of a Data Grid
WOW, you guys Rock!!!!
Now everything works perfect.
Thanks
Jochen
Now everything works perfect.
Thanks
Jochen