DataSource Group by multiple fields remotely

3 posts, 0 answers
  1. Aparna
    Aparna avatar
    16 posts
    Member since:
    May 2012

    Posted 19 Sep 2012 Link to this post

    Hi,

    I would like to group data by multiple fields remotely on server. What is the data format for the grouping and grouped items ? For eg.,

    I have a list of employees as follows :
    Employee[] empList = new Employee[6];
     
    empList[0] = new Employee() { Name = "CA", State = "A", Department = "xyz" };
    empList[1] = new Employee() { Name = "ZP", State = "B", Department = "xyz" };
    empList[2] = new Employee() { Name = "AC", State = "B", Department = "xyz" };
    empList[3] = new Employee() { Name = "AA", State = "A", Department = "xyz" };
    empList[4] = new Employee() { Name = "A2", State = "A", Department = "pqr" };
    empList[5] = new Employee() { Name = "BA", State = "B", Department = "pqr" };

    I would like to group the employee list by State and then by Department.   So my groupings  and grouped items would be :
    A - XYZ   
        - EMP[0], EMP[3]
    A - PQR
       - EMP[4]
    B- XYZ
      - EMP[1], EMP[2]
      B - PQR
     - EMP[5]

    What is the format in which datasource requires these groupings and grouped items  ?  I saw this post http://www.kendoui.com/forums/framework/data-source/datasource-remote-grouping.aspx    but could not figure out how to present multiple key values.

    Thanks



  2. Aparna
    Aparna avatar
    16 posts
    Member since:
    May 2012

    Posted 11 Oct 2012 Link to this post

    Any response ?
  3. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 17 Oct 2012 Link to this post

    Hi Aparna,


    For remote grouping operation you should specify the field which contains the groups in the Schema.groups configuration option

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top