Are there any known limitations to the depth of the object tree bound to a grid?
I’m getting a javascript “Out of stack space” error when trying to save changes to an edited grid in batch mode. It’s not getting as far as the AJAX call.
For example, if I bind to a list of Books:-
Book (BookModel)
Author (AuthorModel)
Publisher (PublisherModel)
BookModel has a property Author (of type AuthorModel), and AuthorModel has a property Publisher (of type PublisherModel). PublisherModel just has a few properties of basic types, so nothing recursive.
The above works fine for binding/displaying data… I bind the grid using AJAX and can include properties from all levels in the grid.
However if I try to edit a cell and click save, I get the “Out of stack space” error.
Through trial and error I discovered that if I remove the Publisher property from the AuthorModel, it will work as expected.
This occurs irrespective of whether I am using any of the properties of the Publisher in the grid… simply having the model referenced within Author is enough to cause the issue.
I’ve even tried creating another (unrelated to PublisherModel) model and attaching it to AuthorModel, with the same results… it seems to be the third level of model causing the issue.
I’ve tried ripping everything out of the page and reducing the grid to the most basic required to function, with a single column that references a string property at the top level (BookModel), but the error still occurs when I try to save changes.
The error is occurring in telerik.grid.editing.min.js at byte/column 7173… “a(n,m,o?o+"."+p:p)”… in “function a(n,m,o)” which seems to be recursively building the object tree and getting in an infinite loop?
TIA for any help…