dataGrid Cell Value

  • Thread starter Thread starter esroinc
  • Start date Start date
E

esroinc

By creating an event that fires when I click on a cell, I am able to
obtain the coordinates of that cell, but I have not been able to get
the data or value in that cell.

cellCoordinates = myGrid.CurrentCell; gives me the coordinates.

How do I obtain the cell value for evaluation and/or validation?
Thanks, Bob J.
 
Try using the Indexer:

r = myGrid..CurrentCell.RowNumber;
c = my Grid.CurrentCell.ColumnNumber ;
string val = my Grid[r,c];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top