This is a migrated thread and some comments may be shown as answers.

How to bound hierarchy structure that is not DataSet?

1 Answer 110 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 28 Aug 2010, 10:47 AM
Hi
        

                I am using RadControls for WinForms Q2 2010 SP1 in .NET 3.5.            

                I would like to bound hierarchy structure to RadGridView that is not DataSet.            

                My structure is quite simple:      

            1. On the top is class ContentTargetFolder:
    
            

public class ContentTargetFolder
{
    private string _name;
    public string Name { get { return _name; } }
    /*…here I have other properties to display*/
    private List<Package> _packages;
    public List<Package> Packages { get { return _packages; } }
    
}

 

            2. Package class:

public class Package
{
    /*…Properties to display…*/
  
    private List<PackageItem> _packageItems = new List<PackageItem>();
    public List<PackageItem> PackageItems { get { return _packageItems;}}
    
}

        3. PackageItem class:

public class PackageItem
{
    /*…Properties to display…*/
  
}

 

                I have List< ContentTargetFolder> CTFs object and I do this:

this.radGridView1.BeginUpdate(); 
this.radGridView1.MasterTemplate.Reset(); 
this.radGridView1.AutoGenerateHierarchy = true;
this.radGridView1.DataMember = string.Empty;
this.radGridView1.DataSource = CTFs;
this.radGridView1.EndUpdate();

The problem is that I get flat list, Packages property from class ContentTargetFolder is displayed as normal property it is not treated as collection of objects.

How can I solve this problem?



Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Julian Benkov
Telerik team
answered on 02 Sep 2010, 02:11 PM
Hi Raymond,

This functionality is not supported in the current edition of RadGridView control. The new object-relational hierarchy mode will be implemented and introduced in Q3 2010. 

Currently, you can manually make inner levels and child GridViewTemplates using bound or unbound mode. Please review the Hierarchy section of our Examples application.

Kind regards,
Julian Benkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Raymond
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or