views:

97

answers:

2

I would like to get to DataGridRow Cells property. It's a table of cells in a current DataGrid. But I cannot get access direct from code nor by Reflection:

var x = dataGridRow.GetType().GetProperty("Cells") //returns null

Is there any way to get this table?

And related question - in Watch window (VS2008) regular properties have an icon of a hand pointing on a sheet of paper. But DataGridRow.Cells has an icon of a hand pointing on a sheet of paper with a little yellow envelope in a left bottom corner - what does it mean?

Thanks for replies.

A: 

The Cells property is internal to the assembly hence you can't access it from code.

AnthonyWJones
and there isn't a way to manipulate them from the code expect in the events?
Polo
+1  A: 

You can get any Cell by its index if you know DataGrid name:

DataGridCell cell = dataGridName.Columns[columnIndex].GetCellContent(e.Row).Parent as DataGridCell;
mt_serg
You still need the RoutedEventArgs to make it possible...
Polo