Removing empty sub-groups with asymmetric bucketing

I'm bucketing a dataset according to three columns: Bucket1, Bucket2, Bucket 3. Not all items have values for Bucket 3 (the lowest bucketing level). In that case the grid is showing a bucket 2 header, an empty bucket 3 header and then the items. Is there a way to remove the empty bucket 3 header and have those items assiciated directly with the bucket 2 header? Also, is there a way of determining the order in which sub-groups are displayed within a group?

Thanks,

Joel




Asymmetric bucketing.zip

1 Reply

AD Administrator Syncfusion Team March 28, 2008 09:49 PM UTC

Hi Joel,

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