Datagrid Cell Information???

  • Thread starter Thread starter Darryn Ross
  • Start date Start date
D

Darryn Ross

Hi,

I am having trouble working out how to get the information in one cell of a
datagrid when in another cell on the same row? without using the Dataset!

Regards

Darryn
 
Hi Darry,

You get the current position with the CurrentCell property, which only contains a row and column number. Use this information to obtain the value for any cell in the grid.

DataGridCell cell = DataGrid.CurrentCell;
object value = DataGrid[cell.RowIndex, cell.ColumnIndex + 1];
 
Back
Top