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

mapping a grouped engine to a tree-view

Thread ID:

Created:

Updated:

Platform:

Replies:

17785 Aug 17,2004 11:19 AM UTC Feb 25,2005 11:58 AM UTC WinForms 4
loading
Tags: Grouping
marcel
Asked On August 17, 2004 11:19 AM UTC

I have created a stand-alone Syncfusion.Grouping.Engine based on a DataView (which overlays a simple DataTable) and have added a Group on one of the Columns that contains duplicates. When I iterate through the Elements and come across a CaptionRow (CaptionSection doesn''t seem to exist) I can examine the Info property which contains a string telling me the number of Items and the group-value. 1) Now is there any way for me to get hold of this info individually?? i.e. not parsing this Info string. 2) Also, since in my sample I have got two ''groups'' how do I get hold of an individual group that I then can query for its Records? NOT going through the entire table.Elements iteration! 3) Ideally, I would like to attach this engine to a tree-view which in this example would show me two base-level nodes each with a number of sub-nodes. I want to expand these nodes on demand, thereby going back to the engine - identiying the group and iterating through its Records.

Administrator [Syncfusion]
Replied On August 17, 2004 07:05 PM UTC

Hi Marcel, When you have a CaptionRow you can query ParentGroup.GetChildCount() for that CaptionRow. ParentGroup.CategoryKeys or ParentGroup.Category will give you the category value for the specific group. To iterate through records in a group, check first if the group has records or nested groups as details. A group can either be a final node with records or it can be a node with nested groups. If a group has records, its Groups collection will be empty and the Records collection will contain all records. If a group has nested groups, its Groups collection will have the nested groups and the Records collection will be empty. To get hold of a specific group that matches a specific category key use the GroupsInDetails.FindGroup method. Example: GridGroup germanyGroup = (GridGroup) this.groupingGrid1.Table.TopLevelGroup.Groups["Germany"]; - or - int index = this.groupingGrid1.Table.TopLevelGroup.Groups.FindGroup("Germany"); if (index != -1) { Group germanyGroup2 = this.groupingGrid1.Table.TopLevelGroup.Groups[index]; Trace.WriteLine(germanyGroup2); } You can then iterate through germanyGroup.Groups and/or germanyGroup.Records We do have a TreeViewAdvDataBound sample in-house which implements pretty much what you describe below. One of our support engineers will update the direct track incident 13004 and send you the TreeViewAdvDataBound sample project. Thanks, Stefan

marcel
Replied On August 18, 2004 06:51 AM UTC

This worked - well again I don''t want to use the GridGroup object but normal casting to the Group class works wonders - full access now to all the groups - excellent - Thanks!

Panji Aryaputra
Replied On February 25, 2005 03:21 AM UTC

Hi Stefan, can you send me the TreeViewAdvDataBound sample? Thanks, Panji

Administrator [Syncfusion]
Replied On February 25, 2005 11:58 AM UTC

Panji, I uploaded it to our ftp site. The URL is: http://www.syncfusion.com/Support/user/uploads/GroupingTreeViewAdv.zip Stefan >Hi Stefan, can you send me the TreeViewAdvDataBound sample? > >Thanks, >Panji

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

;