Selected Cell Text value

Jun 24, 2009 at 1:54 AM
Edited Jun 24, 2009 at 5:26 AM


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



Jun 24, 2009 at 5: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?