I have a data grid named
dgMedical. I need to get the value of the 2nd column
to display in my code. Any help.
is it like
dgMedical.select(1); ?
thanks
Printable View
I have a data grid named
dgMedical. I need to get the value of the 2nd column
to display in my code. Any help.
is it like
dgMedical.select(1); ?
thanks
Hi,
U can use
DataGrid1.Items[selectedItem].Cells[1].Text to get the text of a particular cell in the selected row.
regards,
hi,
another thing you can use is this:
string str = dataGrid1[int rowIndex, int columnIndex].ToString();
or a like i did few days ago:
if you use a mouseklick to select you can do this:
add the
"CurrentCellChanged(object sender,System.EventArgs e)"
message and in the body of it you only need
"string str = dataGrid1[dataGrid1.CurrentCell].ToString().Trim();"
blue skies