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

Build Hierarchical grid when using Enity Framework

3 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Subin
Top achievements
Rank 1
Subin asked on 15 Jan 2017, 06:14 AM

 

Hi ,

Can you help let me know on building hierarchical grid when data is nested within lists. when i use EF, data will be nested list and i need to call new action method to pull hierarchical data.

Can you help me on this ?

Below is sample class structure.

Class Building

{

    int buildingId

  List < location> loc

}

class Location

{

  int buildingId

  int locationID

List<sublocation>

}

Class Sublocation

 int id

  string name

}

 

 

 

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 17 Jan 2017, 12:05 PM
Hello Subin,

Please refer to the following online demo for hierarchical Grid:
As you will notice, the nested Grid will have its own Read action methods, where an identifying key from the parent is passed to the action.


Best Regards,
Konstantin Dikov
Telerik by Progress
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.
0
Subin
Top achievements
Rank 1
answered on 20 Jan 2017, 06:12 AM

Hi Konstantin,

Thanks for your reply.

But my nested grid data will be with parent list. I no need to call action separately to to display nested grid.

Below is ex: For building id :1 corresponding nested grid data will be in loc as shown in below.

Can this be achived. Please let me know.

Ex :
Class Building
{
    int buildingId
  List < location> loc
}

Regards,

Kiran

 

0
Accepted
Konstantin Dikov
Telerik team
answered on 23 Jan 2017, 01:57 PM
Hi Subin,

You can handle the DetailInit event of the parent Grid and use the approach suggested in the following forum thread:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
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
Grid
Asked by
Subin
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Subin
Top achievements
Rank 1
Share this question
or