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

Hierarchical Grid View mix bound and unbound data

1 Answer 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kind
Top achievements
Rank 1
Kind asked on 16 Aug 2017, 04:56 PM

hi. 

I have 3 tables that structure showed in attached picture and I want to create the manual hierarchy. for this goal I do this steps  :

1. add column to master and child's template from designer and set "FieldName" property to table file name

2. add GridVew relation from for these master/child template.

3. in the button event click, load tables and set GridView DataSource & child template DataSource from entity framwork:

 using (var entity = new VaccinationEntities())
            {
                radGridView1.DataSource = entity.Patients.ToList();
                childTemplate1.DataSource = entity.ChildVaccinations.ToList();
                childTemplate2.DataSource = entity.ProblemBackgrounds.ToList();
            }

but after load data just master template showed in GridView without child template.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Aug 2017, 07:55 AM
Hello , 

Thank you for writing.  

If you generate the columns manually either at design time or run time, note that it is necessary the FieldName and Name properties of the columns participating in the relation to have equal values. Thus, the hierarchical data will be properly populated. Additional information for binding to hierarchical data programmatically is available in the following help article: http://docs.telerik.com/devtools/winforms/gridview/hierarchical-grid/binding-to-hierarchical-data-programmatically

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Kind
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or