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

edit Grid grouping template

4 Answers 751 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mauro
Top achievements
Rank 1
Mauro asked on 15 Mar 2018, 05:56 PM
how to edit grid grouping template
Aurobindo
Top achievements
Rank 1
commented on 28 Aug 2023, 07:46 AM

Can I add the groupable column and inline editing feature both in a Data Grid?
Martin
Telerik team
commented on 30 Aug 2023, 07:01 AM

Hello, 

the two features are compatible, please check this Dojo example for reference.

4 Answers, 1 is accepted

Sort by
1
Alex Hajigeorgieva
Telerik team
answered on 19 Mar 2018, 07:15 AM
Hello, Mauro,

The Kendo UI Grid public API offers two group templates - groupHeaderTemplate and groupFooterTemplate:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.groupheadertemplate
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.groupfootertemplate

Have a look and let me know if you need further assistance with either of the templates. Should you need to achieve something not covered by the groupHeader.groupFooter templates, please provide more details so I can advise accordingly.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mauro
Top achievements
Rank 1
answered on 21 Mar 2018, 04:54 PM

hello, Alex

1) I need the whole line to be clickable.
2) The lines of the grouping are hidden by default

 

0
Accepted
Alex Hajigeorgieva
Telerik team
answered on 22 Mar 2018, 09:39 AM
Hi, Mauro,

To use the whole grouping row of the Kendo UI Grid to collapse and expand groups, you could add a "click" handler which targets them and then programmatically find and click the expand/collapse icons. 

$(".k-grouping-row").on("click", function(e){
  $(e.target).find(".k-icon").click();
});

To indicate that it the row is "clickable", then also add a CSS rule for the row:

<style>
  .k-grouping-row {
    cursor:pointer;
  }
</style>

Here is a  runnable Dojo for your convenience:

https://dojo.telerik.com/@bubblemaster/OyaziyoV

Regarding the second requirement - "The lines of the grouping are hidden by default", I suppose that you wish to collapse the groups initially? If this is the case, you can have a look at the knowledge base article at:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-collapse-groups

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mauro
Top achievements
Rank 1
answered on 28 Mar 2018, 07:41 AM

ok

thank you very much

Tags
Grid
Asked by
Mauro
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Mauro
Top achievements
Rank 1
Share this question
or