Build Hierarchical grid when using Enity Framework

4 posts, 1 answers
  1. Subin
    Subin  avatar
    6 posts
    Member since:
    Jan 2016

    Posted 15 Jan 2017 Link to this post

     

    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

    }

     

     

     

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 17 Jan 2017 Link to this post

    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.
  3. Subin
    Subin  avatar
    6 posts
    Member since:
    Jan 2016

    Posted 20 Jan 2017 in reply to Konstantin Dikov Link to this post

    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

     

  4. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 23 Jan 2017 Link to this post

    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.
Back to Top