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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grouping entire GGC from Detail record

Thread ID:

Created:

Updated:

Platform:

Replies:

35540 Oct 3,2005 03:19 PM UTC Oct 4,2005 02:26 PM UTC WinForms 8
loading
Tags: GridControl
Jay Mooney
Asked On October 3, 2005 03:19 PM UTC

I have the following scenario, I have a master/detail relationship between 2 tables. I want to be able to use a Grid Grouping Control to show this relationship in a hierarchical manner. (No problems so far) The catch is that I want to be able to group the entire grid by selecting a column from the detail group. The only way I have found to do this is to flatten my tables using the ForeignKey relationship. This is functionally correct, but I would like to keep my presentation in a hierarchical format. For the visually inclined here''s what I have: CityID | City | State | Zip ----- Address1 | Address 2 | CityID I would like to be able to group Cities by Address1 (contrived I know) I would like to be able to grab Is this possible? If so how, if not why :)

Administrator [Syncfusion]
Replied On October 3, 2005 03:55 PM UTC

Try adding the column to the ChildTableDescriptor''s GroupedColumns collection. //"ParentToChild" is name of the relation //"Address1" is column in child this.hierarchyGrid.TableDescriptor.Relations["ParentToChild"].ChildTableDescriptor.GroupedColumns.Add("Address1");

Jay Mooney
Replied On October 3, 2005 04:46 PM UTC

>Try adding the column to the ChildTableDescriptor''s GroupedColumns collection. > >//"ParentToChild" is name of the relation >//"Address1" is column in child >this.hierarchyGrid.TableDescriptor.Relations["ParentToChild"].ChildTableDescriptor.GroupedColumns.Add("Address1"); > Thanks for the reply, it doesn''t quite do what I was looking for though. Adding "Address" to the child''s group column collection does organize the details, but the master record is still unaffected.

Administrator [Syncfusion]
Replied On October 3, 2005 06:50 PM UTC

I am not sure how this would work if there are 15 different Address detail records under the same master record. Do you expect he Master record repeated 15 times? If the above one master to many details is not a problem, then you could try adding an unbound columns (using the gridMaster.TableDescriptor.UnboundColumns collection), and then in the QueryValue event that populates this unbound colunmn, you can provide teh Address detail value you want associated with this master record. The you could group by this unbound column. If you do not want to see it, you could also remove it from the gridmaster.TableDescriptor.VisibleColumns collection.

Jay Mooney
Replied On October 3, 2005 06:53 PM UTC

Thank you. I''m not sure on the record dynamics. I''ll check into it to see if we have a one to many scenario. I''ll give your suggestion a try and see how it applies to my scenario. Then I''ll post the results :)

Jay Mooney
Replied On October 3, 2005 09:42 PM UTC

No dice. That works for a single column, but is not generic enough to work with multiple child columns.

Administrator [Syncfusion]
Replied On October 4, 2005 12:29 AM UTC

Jay, check out the ProductRatings example. It shows a m:n relation when you group by rating. Products can have multiple ratings by different customers and when you group by rating the product can appear in more than one category. Stefan

Jay Mooney
Replied On October 4, 2005 01:40 PM UTC

Thanks.

Jay Mooney
Replied On October 4, 2005 02:26 PM UTC

I just got done testing. this works perfectly. Thank both of you very much!!! (please excuse the excessive personality, family trait :))

CONFIRMATION

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.

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

;