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

XML Error when adding row to empty grid

0 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 23 May 2012, 02:57 AM
I'm using XML so I don't know if this is an issue with JSON datasources.

I have a grid with nodata and when I try to add a row I get a script error

SCRIPT5007: Unable to get value of the property 'TREEVIEWS': object is null or undefined
kendo.data.xml.js, line 146 character 17

TREEVIEWS is from the schema
schema: {
    type: 'xml',
    data: '/TABLE/TREEVIEWS',
    model: {
     id: "treeview",
     fields: {
      treeview: { editable:false, field: "treeview/text()" },
      name:   { editable:true,  field: "name/text()", defaultValue:"" },
      created: { editable:false, field: "created/text()", defaultValue:"" }
     }
    }

The call stack is:
 evaluate
 data
 total
 _change
 g
 trigger
 splice
 insert
 addRow
 Anonymous Function
 dispatch
 i

Any ideas on how to add a row to an empty grid ?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Share this question
or