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

I´m sometimes getting this error: Ucaught TypeError: Cannot read property 'removeClass' of undefined

1 Answer 2530 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kalli Kaldi
Top achievements
Rank 1
Kalli Kaldi asked on 19 Aug 2016, 10:31 AM

hello there

I´m running into a strange kendo error when my code is updating the grid,  but it only happens sometimes

but never after a refresh of the page only when data has been added once to the grid and then I´m getting a new datasource and adding it to the grid then this happens sometims

 

the probelm lies in this function:

_hideResizeHandle: function() {
                this.resizeHandle && (this.resizeHandle.data("th").removeClass("k-column-active"),
                this.lockedContent && !this._isMobile ? (this.resizeHandle.off(We).remove(),
                this.resizeHandle = null ) : this.resizeHandle.hide())
            },

 

I´ve attached a picture of the error

1 Answer, 1 is accepted

Sort by
1
Stefan
Telerik team
answered on 23 Aug 2016, 08:58 AM
Hello Karl,

The error can occur if the Kendo UI Grid is initialized more than once.

http://docs.telerik.com/kendo-ui/intro/installation/jquery-initialization#duplicate-initialization

If you need to refresh the Grid data manually, use the read method of the Grid's dataSource instance:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#fields-dataSource
 
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-read

If you need to recreate the Grid, then destroy it first, and empty its container <div>.

http://docs.telerik.com/kendo-ui/framework/widgets/destroy
 
https://api.jquery.com/empty/

If additional assistance is needed, please provide the following information:

1) An isolated fully runnable example that reproduces the issue.
2) Scenarios when the issue is reproduced.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Luke
Top achievements
Rank 1
commented on 05 Aug 2021, 01:36 AM

you save me.

thanks bro!!

Tags
Grid
Asked by
Kalli Kaldi
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or