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

Custom Group header for Grouping column

1 Answer 2402 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sp
Top achievements
Rank 1
Veteran
Sp asked on 23 Mar 2021, 07:22 PM

Hi Team,

I am working on Kendo grid grouping , my requirement is need to change the group header name instead of column name . 

Example : 

My grid contains following columns

name , city , state , language  

 

we need to group by language column and is set to  visible false in grid.

Tried with 

1. GroupHeaderTemplate

2. ClientGroupHeaderTemplate(@<text>Language (local language) : </text>)

 

 

Thanks & Regards,

Sp

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 26 Mar 2021, 12:00 PM

Hi,

As far as I understand the scenario, you need to configure a group header template and at the same time, the column to which it is configured should be hidden. If this is the case I would suggest you use the ClientGroupHeaderTemplate as in the example below:

columns.Bound(p => p.ShipName).Hidden(true).ClientGroupHeaderTemplate("<b> #= data.value # </b> "); ;

As you mentioned that you have tried the ClientGroupHeaderTemplate, could you please let me know what was not working for you when using this configuration? 

The approach is demonstrated also in the Dojo linked here.

You could also take a look at the Forum thread linked below where hiding the grouping column is discussed.

- https://www.telerik.com/forums/how-to-hide-grouping-column

I hope the provided information will be helpful. 

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Sp
Top achievements
Rank 1
Veteran
Answers by
Neli
Telerik team
Share this question
or