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

2 posts, 0 answers
  1. Kalli Kaldi
    Kalli Kaldi avatar
    27 posts
    Member since:
    Oct 2011

    Posted 19 Aug Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    267 posts

    Posted 23 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top