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

Databound GridGroupingControl subtables

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

4 Replies

AD Administrator Syncfusion Team October 24, 2004 06:25 AM UTC

I can see the behavior you described in 2.1.0.9. 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.


AD Administrator Syncfusion Team 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 2.1.0.61]


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon