DataGrid

  • Thread starter Thread starter A.J
  • Start date Start date
A

A.J

I am trying to put the selected cell in the datagrid into a
textbox(using currentcellchanged event).
----------------------------
DataGridCell currentcell;
string currentcelldata;
currentcell = dgrTest.CurrentCell;
currentcelldata =
dgrTest(currentcell.RowNumber,currentcell.ColumnNumber);
//don't know how to convert this into string


textBox1.Text = currentcelldata;
 
dgrTest[currentcell.RowNumber,currentcell.ColumnNumber].ToString();

or

(string)dgrTest[currentcell.RowNumber,currentcell.ColumnNumber];

HTH
VJ
 
Back
Top