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

Customization of the kendo.ui.Grid

3 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian Storb
Top achievements
Rank 2
Veteran
Christian Storb asked on 17 Jun 2020, 10:06 AM

I want to customize the kendo.ui.Grid for my application and create a base class kendo.ui.GridEx that inherits from the kendo.ui.Grid class. Everything works fine, except with columns.selectable (true). The check boxes appear, but the click events are not handled. Therefore the selection method does not work either (no rows returned).

Example: https://jsfiddle.net/chstorb/g3n5or69/

3 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 19 Jun 2020, 07:03 AM

Hi Chris,

In the internal logic for the Kendo UI Grid, there is an additional check to ensure that the selected row will not affect any parent rows - the selection has to remain for the current grid only. Therefore, when the name of the grid is changed (it is extended) the selector will not target the grid. What I can recommend is that you override the default internal events for the grid. 

For your convenience, I modified the example that you have provided with your initial post: 

https://jsfiddle.net/fmsqrua8/1/

I hope you find this helpful.

 

Kind regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Christian Storb
Top achievements
Rank 2
Veteran
answered on 19 Jun 2020, 11:59 AM
Hi Tsvetomir,

thank you for supporting me!

Your solution works very well. Still, I made a change: Instead of overwriting the event handlers of the kendo.ui.Grid class, this now only applies to my kendo.ui.GridEx extension https://jsfiddle.net/chstorb/g3n5or69/. 

That's exactly what I wanted. Thanks again!

Kind regards,
Chris
0
Tsvetomir
Telerik team
answered on 19 Jun 2020, 03:16 PM

Hi Chris,

I am very happy to hear that I have been helpful in resolving the case. Indeed, it is a great modification to include the event handlers within the grid's extended options. It helps for better readability and consistency.

In case you have any other queries, do let me know.

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Christian Storb
Top achievements
Rank 2
Veteran
Answers by
Tsvetomir
Telerik team
Christian Storb
Top achievements
Rank 2
Veteran
Share this question
or