Grid.Selectable() cause Uncaught TypeError: Cannot read property 'get' of null

6 posts, 0 answers
  1. Chris
    Chris avatar
    119 posts
    Member since:
    Oct 2015

    Posted 28 Nov 2017 Link to this post

    HI

    I met a error about Grid : 

      Uncaught TypeError: Cannot read property 'get' of null

    I have test my code and found that the Selectable(true) will cause this error : 

    View

          @(Html.Kendo().Grid(Model.ListProperty1)
            .Name("ListProperty1Grid")

            .Selectable(selectable =>
            {
              selectable.Enabled(true);
            })


    Javascript

            var grid;
            var dataSource;
            //
            dataSource = new kendo.data.DataSource(
            {
                data: ...
            });
            //
            grid = $("#ListProperty1Grid").data("kendoGrid");
            grid.setDataSource(dataSource);

    Grid's BUG ?

    *Telerik DevCraft UI for ASP.NET MVC R2 2017 SP1
    *jquery-2.2.4.js
    *jquery-2.2.4.js
    *jquery-2.2.4.js

    VM22852:93 Uncaught TypeError: Cannot read property 'get' of null
     
        at makeWidgetInfo (<anonymous>:93:44)
     
        at <anonymous>:552:33

            function makeWidgetInfo(w, extended) {
                var el = w.wrapper || w.element;
                var ret = {
                    id             : cacheObject(w),
                    type           : w.options.name,
                    prefix         : w.options.prefix,
                    events         : w.events && w.events.length > 0 ? w.events.map(function(evname){
                        return makeSpecial("doclink-event", {
                            event  : evname,
                            widget : w.options.name,
                            prefix : w.options.prefix,
                        });
                    }) : undefined,
                    element_tag    : w.element.get(0).tagName,  <<< ====== Uncaught TypeError: Cannot read property 'get' of null
                    element_id     : w.element.attr("id"),
                    element_class  : w.element.attr("class"),
                    visible        : el.is(":visible"),
                    hasModel       : !!w.dataSource,
                    wasInspected   : w === window.$K,
                };
                if (typeof w.value == "function") {
                    ret.value = tools.safeValueForJSON(w.value());
                }
                if (extended) {
                    ret.widget = tools.safeValueForJSON(w);
                    ret.element = tools.safeValueForJSON(w.element.get(0));
                    if (w.wrapper) {
                        ret.wrapper = tools.safeValueForJSON(w.wrapper.get(0));
                    }
                }
                return ret;
            }

    Best regards

    Chris

     

     

  2. Preslav
    Admin
    Preslav avatar
    576 posts

    Posted 29 Nov 2017 Link to this post

    Hello Chris,

    Based on the provided information, I tested the scenario and I was not able to replicate the problem.

    Having said that, in order to continue my investigation, could you please share an isolated example that clearly demonstrates the problem? This example will help us fully understand the case and we might be able to eventually provide a workaround.

    I look forward to hearing from you.


    Regards,
    Preslav
    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.
  3. David
    David avatar
    22 posts
    Member since:
    Jun 2015

    Posted 09 Jan 2018 Link to this post

    I also continuously get this same error and cannot track down the cause.

    Has the cause of this been identified yet?

  4. David
    David avatar
    22 posts
    Member since:
    Jun 2015

    Posted 09 Jan 2018 Link to this post

    I also get this error continuously.

    Has the cause of this been identified yet?

  5. David
    David avatar
    22 posts
    Member since:
    Jun 2015

    Posted 09 Jan 2018 Link to this post

    I also get this error continuously.
    Has the cause of this been identified yet?
  6. Preslav
    Admin
    Preslav avatar
    576 posts

    Posted 11 Jan 2018 Link to this post

    Hi David,

    For the time being, we were not able to identify the cause of the described issue.

    Having said that, it will help me a lot to investigate the issue further if you prepare and share a sample isolated project that clearly replicates and demonstrates the issue. This project will help me in fully understanding the case and eventually I might be able to find a workaround.

     
    Regards,
    Preslav
    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.
Back to Top