Selected Cell Text value

Jun 24, 2009 at 12:54 AM
Edited Jun 24, 2009 at 4:26 AM


How can I get the selected Cell Text Value from a DataGrid instances?



Jun 24, 2009 at 4:39 AM

I can see the Cell Text value with the "DataGridCellInfo.Owner.CurrentCellContainer". But there is no way to access the Owner since it is a private member...

DataGridCellInfo dataGridCellInfo = dataGrid.CurrentCell;

string s = dataGridCellInfo.Owner.CurrentCellContainer.ToString(); // Cannot access private property owner here.

Is there anyway to access these private members?