Selecting a Datagrid column using a variable
Posted: Fri Nov 25, 2011 12:14 pm
I just can't get this to work.
I'm trying to get the contents of a datagrid cell from a column, where I use a variable to define the actual column.
This is the problem I'm having:
put 2 into tnumbera
put quote & "Col" & tnumbera & quote into tcola
put theDataA[tcola]
theDataA is the line data of a datagrid
If I use put theDataA["Col2"] ..... it returns the right value
but if I use put theDataA[tcola] ....... it doesn't return anything
Any idea what I am doing wrong ?
Kev
I'm trying to get the contents of a datagrid cell from a column, where I use a variable to define the actual column.
This is the problem I'm having:
put 2 into tnumbera
put quote & "Col" & tnumbera & quote into tcola
put theDataA[tcola]
theDataA is the line data of a datagrid
If I use put theDataA["Col2"] ..... it returns the right value
but if I use put theDataA[tcola] ....... it doesn't return anything
Any idea what I am doing wrong ?
Kev