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

DataSource Group by multiple fields remotely

2 Answers 359 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Aparna
Top achievements
Rank 1
Aparna asked on 19 Sep 2012, 06:29 PM
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 Answers, 1 is accepted

Sort by
0
Aparna
Top achievements
Rank 1
answered on 11 Oct 2012, 09:09 PM
Any response ?
0
Vladimir Iliev
Telerik team
answered on 17 Oct 2012, 06:56 AM
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!
Tags
Data Source
Asked by
Aparna
Top achievements
Rank 1
Answers by
Aparna
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or