0

I am trying to get a value from a specific cell in a dataGridView.
I know how to choose a Row / Column but not at the same time.
I have tried to get the value from row 3 in column 2 like below. But I cant find a Column member to Rows like this.

dataGridView1->Rows[3]->Columns[2] ?

I tried something like this also but here I will get an Object^. I will need to have a String^ value.

Object^ Sel50 = dataGridView1[3, 2];
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by milind morey
0

I found out a solution:

String^ Number = dataGridView1->SelectedRows[0]->Cells[2]->Value->ToString();
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.