Hi,
I have a requirement to display just the columns of my empty XamWebGrid and so am trying to write a unit test to iterate over the row header cells and assert column content template UI values. I have seen the code below to get the , but unfortunately it requires you have at least one row before you can get to the XamWebGridRowsManager,
Row r = this.DataGrid1.Rows[0];HeaderCellControl hcc = (HeaderCellControl)((RowsManager)r.Manager). HeaderRow.Cells["IsFavorite"].Control;if (hcc != null){ CheckBox headerCB = hcc.Content as CheckBox;}
How can I get access to the RowsManager without any rows so I can navigate iterate over the rowheader column cells.
Thanks in advance
Currenty, we've only exposed the RowsManager publicly off of our RowBase object.
However, we do expose a RowsManager property off of the XamWebGrid, it's just protected. So technically you could derive from the XamWebGrid, and expose the property yourself.
public class MyGrid : XamWebGrid
{
public XamWebGridRowsManager GridRowsManager
get{return this.RowsManager;}
}
Hope this helps,
-SteveZ