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开发者_StackOverflow社区 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.
You can get any Cell by its index if you know DataGrid name:
DataGridCell cell = dataGridName.Columns[columnIndex].GetCellContent(e.Row).Parent as DataGridCell;
The Cells property is internal to the assembly hence you can't access it from code.
精彩评论