开发者

DataGridRow Cells property

开发者 https://www.devze.com 2022-12-24 16:52 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消