{"action":"created","issue":{"url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/98","labels_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/98/comments","events_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/98/events","html_url":"https://github.com/free-jqgrid/jqGrid/issues/98","id":89645830,"number":98,"title":"treegrid changes in 4.9.0","user":{"login":"john-w-watson","id":12719210,"avatar_url":"https://avatars.githubusercontent.com/u/12719210?v=3","gravatar_id":"","url":"https://api.github.com/users/john-w-watson","html_url":"https://github.com/john-w-watson","followers_url":"https://api.github.com/users/john-w-watson/followers","following_url":"https://api.github.com/users/john-w-watson/following{/other_user}","gists_url":"https://api.github.com/users/john-w-watson/gists{/gist_id}","starred_url":"https://api.github.com/users/john-w-watson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-w-watson/subscriptions","organizations_url":"https://api.github.com/users/john-w-watson/orgs","repos_url":"https://api.github.com/users/john-w-watson/repos","events_url":"https://api.github.com/users/john-w-watson/events{/privacy}","received_events_url":"https://api.github.com/users/john-w-watson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-19T19:46:38Z","updated_at":"2015-06-19T22:36:43Z","closed_at":null,"body":"Hi Oleg - I have an existing treegrid that works in 4.8.0.  Do you have any examples of what I need to change to get my treegrid working in 4.9.0?  I saw the note regarding \"additionalProperties\", but I don't understand exactly what I need to change.  I'm using datatype set to a function, and use addJSONData to load the data into the grid."},"comment":{"url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/comments/113662543","html_url":"https://github.com/free-jqgrid/jqGrid/issues/98#issuecomment-113662543","issue_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/98","id":113662543,"user":{"login":"OlegKi","id":249117,"avatar_url":"https://avatars.githubusercontent.com/u/249117?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegKi","html_url":"https://github.com/OlegKi","followers_url":"https://api.github.com/users/OlegKi/followers","following_url":"https://api.github.com/users/OlegKi/following{/other_user}","gists_url":"https://api.github.com/users/OlegKi/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegKi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegKi/subscriptions","organizations_url":"https://api.github.com/users/OlegKi/orgs","repos_url":"https://api.github.com/users/OlegKi/repos","events_url":"https://api.github.com/users/OlegKi/events{/privacy}","received_events_url":"https://api.github.com/users/OlegKi/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T22:36:43Z","updated_at":"2015-06-19T22:36:43Z","body":"It seems to my that you have absolutely standard situation and you should just use `datatype: \"jsonstring\", datastr: mydata` where object `mydata` is your data or the array which you use as the value of `rows` property. It should solve your problem. See [the old demo](http://www.ok-soft-gmbh.com/jqGrid/OK/LocalAdjacencyTree.htm) as an example. I see no reason to use `datatype` as function in the way.\r\n\r\nThe only way why the feature `datatype` as function exist is loading of data from the server by some non-standard protocol, for example by WebSocket. The typical examples of usage `datatype` as function was the usage in absolutely another case and the usage was in 99% wrong. It broken many features of jqGrid by such wrong implementation. For example the `datatype` as function **must** calls some callbacks and trigger some events which used other parts of jqGrid and your code probably too. . You can find an example of the simplest implementation of `datatype` as function in [the answer](http://stackoverflow.com/a/7455157/315935) written almost 4 years ago. Since the time jqGrid become more complex and the callback `datatype` contains 5 parameters since a long time. All examples of the usage `datatype` as function was incorrect implementation which can be easy replaced with more standard and simple code."}}