Rolling up empty groups

I'm bucketing a dataset according to three levels: level1, level2, level3. Sometimes level 3 is empty. Is there a way to roll up the items into the level 2 header and not show the empty level 3 header? I'm rephrasing a previous question because I'm thinking maybe it wasn't understood.




1 Reply

AD Administrator Syncfusion Team March 26, 2008 10:44 PM UTC

Hi,

To disable the Expand of column header where no records found in child table,you need to write below code in the event of QueryCellStyleInfo.


protected void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordPlusMinusCell)
{
Record r = e.TableCellIdentity.DisplayElement.ParentRecord as Record;
if (r != null && r.NestedTables.Count > 0 && r.NestedTables[0].ChildTable.FilteredChildNodeCount == 0)
{
e.Style.CellType = "Static";
}
}
}

please refer the below KB article

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=311


Best regards,
Johnson



Loader.
Up arrow icon