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

Formatting an Aggregate/ClientFooterTemplate Row

2 Answers 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 07 Oct 2016, 11:07 PM

Hi, I have a grid with an aggregate footer and columns formatted with a ClientFooterTemplate. How can I format an entire aggregate row like set the background color across all cells in the row based on an aggregate value? Also, how can I hide the aggregate row - like when there is only one detail row in the grid? Does anyone have an example of either of these scenarios?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 10 Oct 2016, 05:08 PM
Maybe this isn't possible? BTW, I'm using the Kendo UI Grid for ASP.NET MVC.
0
Konstantin Dikov
Telerik team
answered on 11 Oct 2016, 11:39 AM
Hello Brian,

For changing the colors of the TD elements or for the entire TR element (corresponding to the footer) you can wrap the aggregate values in span elements for example and within the dataBound event of the Grid, retrieve the values and manipulate the HTML elements as per your requirements. For your convenience, following is a simple example demonstrating such customization:
As for the hiding of the footer, you can toggle its visibility with the following jQuery selector:
function toggleFooter(){
    $("#grid .k-grid-footer").toggle();
}

Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or