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.
Unfortunately, activation email could not send to your email. Please try again.

GridGroupingControl and "Sub" Records

Thread ID:





11039 Feb 20,2004 09:30 PM Feb 23,2004 12:57 PM Windows Forms 2
Tags: Grouping
Randy Kennison
Asked On February 20, 2004 09:30 PM

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?

Administrator [Syncfusion]
Replied On February 23, 2004 11:56 AM

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

Randy Kennison
Replied On February 23, 2004 12:57 PM

Thanks, will try it this afternoon.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.