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

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

5 Answers 258 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Chris asked on 28 Nov 2017, 09:14 AM

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

 

 

5 Answers, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 29 Nov 2017, 11:33 AM
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.
0
David
Top achievements
Rank 1
answered on 09 Jan 2018, 01:10 PM

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

Has the cause of this been identified yet?

0
David
Top achievements
Rank 1
answered on 09 Jan 2018, 01:11 PM

I also get this error continuously.

Has the cause of this been identified yet?

0
David
Top achievements
Rank 1
answered on 09 Jan 2018, 01:12 PM
I also get this error continuously.
Has the cause of this been identified yet?
0
Preslav
Telerik team
answered on 11 Jan 2018, 08:27 AM
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.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Preslav
Telerik team
David
Top achievements
Rank 1
Share this question
or