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

Can I have a summary row stay at the first row of the grid?

2 Answers 652 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 13 Feb 2015, 08:04 PM
I am new to kendo UI, need your help, please -

I am trying to use kendogrid to create a table. Please see the attached image as an example.  

I have a special requirement - need a summary row always keeps in the first row regardless how the table is sorted. So my questions are:
1. Can I insert a summary row (data is in different format comparing to other rows) into the table?
2. How to keep the summary row always in the first place of the table?
3. The data I loaded from server via Ajax call in the following format, how to split it for the Summary row and the regular row.  
{  
    {"Summary":{"working order": 5, "completed order": 15}},
    {"Details":
     ["User Name": "Jerry", "working order":2,  "Completed order": 10],
     ["User Name": "Peter", "working order":3,  "Completed order": 6]}
}  
** the summary is not sum of the columns. 

If kendogrid doesn't support it, any suggestion for a workaround? 

Thanks,
Jerry

2 Answers, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 17 Feb 2015, 03:49 PM
Hello Jerry,

Our implementation of the summary row that you shared is actually our footer template. Sadly the position can only be at the bottom and if you want to provide the values shown on this row you need to override the templates by invoking external functions.

http://demos.telerik.com/kendo-ui/grid/aggregates


How to invoke external function from the footerTemplate is covered here (the example is for column template but the approach remains the same).

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jerry
Top achievements
Rank 1
answered on 17 Feb 2015, 11:41 PM
Thank you Petur for your reply. It helps :-)
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or