We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridGroupingControl and "Sub" Records

Using sub records in a grouping grid, a "+" is displayed next to every record in the top most dataset, even when there are no records contained in the subrecords for it. Can this behavior be worked around?

2 Replies

AD Administrator Syncfusion Team February 23, 2004 04:56 PM UTC

Randy, Try handling the QueryCellStyleInfo event as follows: private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.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.GetFilteredRecordCount() == 0) { e.Style.CellType = "Static"; } } } Then, no button should be displayed. Let me know if you run into problems. Thanks, Stefan Hoenig


RK Randy Kennison February 23, 2004 05:57 PM UTC

Thanks, will try it this afternoon.

Loader.
Live Chat Icon For mobile
Up arrow icon