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

Unable to get property 'data' error while updating Grid

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naga
Top achievements
Rank 1
Naga asked on 25 Aug 2015, 07:53 PM

Hello, 

I am trying to update the grid through popup

I am getting the below error 
0x800a138f - JavaScript runtime error: Unable to get property 'data' of undefined or null reference
also if I click the Edit button and again click on cancel in the Edit popup , the record i have used is missing in the grid
Please help me 
here is my code.
 dataSource: {
                type: "json",
                transport: {
                    read: URL,
                    update: {
                            url: UpdateURL,
                            dataType: "json",
                            type: "POST"
                    },
                    parameterMap: function (data, operation) {
                        if (operation !== "read") {
                            return kendo.stringify(data);
                        }
                    }
                },
                requestStart: function(e) {
                    if (e.type == "update") {
                        //My LOGIC
                        debugger;
                    }
                },

                schema: {

  type: "json",
  id: "ID",
                    model: {
                        fields: {
                            ID: { type: "number", editable: false},
                            Name: { type: "string", validation: { required: true } },
                            Status: { type: "string" },                            
   Access: { type: "string", nullable: true },
                            Address: { type: "string" },
                            Comment: { type: "string", validation: { required: true } },
                            ParentID: { type: "number", validation: { required: true } },
                            ParentName: { type: "string" },
                        }
                    }
                },
                serverPaging: false,
                serverFiltering: false,
                serverSorting: false
            },
            height: 550,
            filterable: true,
            sortable: true,
            pageable: {
                pageSize: 100,
                refresh: true
            },


            columns: [

            { command: ["edit"], title: " ", width: "100px" },
   { field: "ID", title: "ID", width: "300px" },
            { field: "Name", title: "SubInventory", width: "300px" },
            { field: "Status", title: "Active", width: "75px" },
            { field: "Access", title: "Access", width: "200px" },
            { field: "Address" },
            { field: "Comment", tite: "Comments", width: "250px" },
            { field: "ParentID", title: "ParentName", width: "180px", editor: dropdownforParent}
]
            , filterMenuInit: onFilterMenuInitSI,
            editable: "popup",
        }).data("kendoGrid");

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 27 Aug 2015, 11:59 AM

Hello Naga,

 

From the provided code I am not able to tell you why exactly this issue occurs. Would it be possible to extract a small runnable sample that reproduces the issue, so we can take a look and see what happens?

 

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Naga
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or