How can I obtain the values of the variables in a datagrid? I would like to specifically obtain the values that a user selects or which the little triangle/arrow on the left column denotes. Thanks.
casox
Printable View
How can I obtain the values of the variables in a datagrid? I would like to specifically obtain the values that a user selects or which the little triangle/arrow on the left column denotes. Thanks.
casox
In the DataGrid1's RowColChange event, type this:
[your variable] = DataGrid1.Text
Getting the value of where the arrow is pointing...sorry, can't help you there.
hkmai's code returns value of currently selected cell.
If you want the arrow-denoted row, use the .row property, this returns the activerow, i think it's something like
yourvar = DBgrid1.Rows(DBgrid1.Row).Value
(the syntax might be inaccurate but i hope you get the idea)