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

how did it happened "Uncaught TypeError: Object #<Object> has no method 'toJSON'"

1 Answer 179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 1
Johnny asked on 18 Apr 2012, 10:52 AM
I did this job follow the Thread : http://www.kendoui.com/forums/ui/grid/how-can-i-get-the-pure-json-data-of-the-selected-row.aspx
this is my code:
$("#synchronizationStart").click(function(){
var $row = $("#employee").data("kendoGrid").select();
var data = [];
for (var i = 0; i < $row.length; i++) {
data[i] = $("#employee").data("kendoGrid").dataItem($row[0]).toJSON();
alert(data[i]);
}
});
});
but it did't work in my project.
Here is the error in  chrome's console:
  1. Uncaught TypeError: Object #<Object> has no method 'toJSON'
    1. (anonymous function)showStaff:136
    2. f.event.dispatchjquery-1.7.1.min.js:3
    3. f.event.add.h.handle.i

so, what should i do  ?
since my native language is not English, please forgive my grammar errors :)

1 Answer, 1 is accepted

Sort by
0
Liviu
Top achievements
Rank 1
answered on 24 May 2012, 02:42 PM
Hello, I had this problem too and I solved by copying all folder Scripts to prod
Tags
Grid
Asked by
Johnny
Top achievements
Rank 1
Answers by
Liviu
Top achievements
Rank 1
Share this question
or