Hello i got a problem to get the value from a cell in the Datagrid!
I got an searchoption to fill my datagrid..... now the user has to select item he wants to se more about.
The value is always stored in Column0 but the rows are always different.
I know how to get the value from a specified Cell
like
Value = DataGrid1.Item(0, 0)
but it isnt always 0, 0 it could also be 1, 0 or something!!
so what can i do
I also found something here
You can do this for column number....
MessageBox.Show(myGrid1.CurrentCell.ColumnNumber.ToString)
Row number...
MessageBox.Show(myGrid1.CurrentCell.RowNumber.ToString)
Both row and column (as string)
MessageBox.Show(myGrid1.CurrentCell.ToString)
But the string i get doesnt contain the value of the field just where i selected!!!!!
I love to hate programming
Thanks for any advice!
Bye
I got an searchoption to fill my datagrid..... now the user has to select item he wants to se more about.
The value is always stored in Column0 but the rows are always different.
I know how to get the value from a specified Cell
like
Value = DataGrid1.Item(0, 0)
but it isnt always 0, 0 it could also be 1, 0 or something!!
so what can i do
I also found something here
You can do this for column number....
MessageBox.Show(myGrid1.CurrentCell.ColumnNumber.ToString)
Row number...
MessageBox.Show(myGrid1.CurrentCell.RowNumber.ToString)
Both row and column (as string)
MessageBox.Show(myGrid1.CurrentCell.ToString)
But the string i get doesnt contain the value of the field just where i selected!!!!!
I love to hate programming
Thanks for any advice!
Bye