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

Databound GridGroupingControl subtables

Thread ID:





20717 Oct 23,2004 10:43 PM UTC Oct 25,2004 06:28 PM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On October 23, 2004 10:43 PM UTC

I have a GridGroupingControl which I bind to a DataView. The DataView''s underlying DataTable has several relations to other tables. When I expand a particular row in the Top Level table, I correctly see the subtables for the relations. However, there don''t seem to be any rows in those subtables (and the Summary line says there are 0 items). How do I get the rows to appear? (I''m sure I must be missing something, but I have no idea where to start debugging here; it seems to match the samples, given that my case is a little different). Also, I verified that there are indeed related rows in those tables. In TableControlCurrentCellActivated, I added: _log.Debug("subrows: " + item.Categories().Length); and it prints "subrows: 3". However, the Categories subtable displays zero rows. Thank you very much, Dan

Administrator [Syncfusion]
Replied On October 24, 2004 06:25 AM UTC

I can see the behavior you described in If I set this.gridGroupingControl1.DataSource = new DataView(parentTable, "[parentID] < 3", "", DataViewRowState.CurrentRows); the child tables come up empty. But if set this.gridGroupingControl1.DataSource = parentTable.DefaultView; parentTable.DefaultView.RowFilter = "[parentID] < 3"; the child tables come up populated OK. Can you use this as a work around until we investigate the non-working use case further? This may have to do with the objects using different bindingcontexts.

Administrator [Syncfusion]
Replied On October 24, 2004 06:06 PM UTC

Thank you. Since it''s not a core feature of what I''m doing and making that change would break the model/view separation in my program, what I''ll do is add a DirectTrac item to follow this. If I''m getting closer to shipping and it''s not resolved, I''ll try the workaround. Also, is there a way that each of those subtables can be separated expanded/collapsed? E.g., each one has a "+" button next to it and isn''t fuly shown until that button is pressed. Thanks. [BTW: I''m currently on]

Administrator [Syncfusion]
Replied On October 25, 2004 05:32 AM UTC

If I understand what you want, try handling the grid.Table.RecordExpanding event, and close all netested tables at that point. Here is a little sample. GGCParentToChilds_9128.zip

Administrator [Syncfusion]
Replied On October 25, 2004 06:28 PM UTC

Yes; that''s pretty good. If there''s a way to have the "+"/"-" buttons on the left, it would be cool. In this version, you click the header bars (and I assume I can add an event to re-close them when the user clicks again on the summary). Thanks, Dan


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon