I am using RadGrid for WPF. I am binding a Collection Class with out using dataset..
Can anybody help me to do...
Problem Iam Facing : When i define parent filed "GridViewDataColumn", I not able to define child filed "GridViewDataColum"
1 Answer, 1 is accepted
answered on 02 Oct 2008, 08:05 AM
To enable hierarchy mode of the RadGridView control you have to define a ChildTableDefinition and add it to ChildTableDefinition collection of the RadGridView.TableDefinition.
GridViewTableDefinition detailDefinition = new GridViewTableDefinition();
detailDefinition.Relation = new PropertyRelation("Orders");
radGridView1.ItemsSource = BuildCustomers();
GridViewDataColumns for the child grid will be created according to the information within the ChildTableDefinition object.
This code snippet above is taken from the "Property Hierarchy" examle. Take a look at the "Property Hierarchy" and the "Custom Hierarchy" examples available at http://demos.telerik.com/wpf/ and in your offline sample apps. They contain the working code for a scenario that looks identical to yours.
For details on creating hierarchy you can go through the http://www.telerik.com/help/wpf/gridview-fundamentals-hierarchical.html help topic.
Hope this will help.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.