I solved the above use case in the following way:
1) Made the datatype: 'json'
2: Added a "beforeRequest" event to the treegrid (to prevent ajax request from firing)
beforeRequest: function() {
return false;
}
3. Used addJSONData in the place where I wanted to add the data (Refer to the use case link)
jQuery("#tableId")[0].addJSONData(mydata);
I read some posts here suggesting to avoid addJSONData usage. However, I did not find any issues using addJSONData till now and would like to hear why addJSONData usage is bad.
I believe, there are other ways to solve the same problem (using localReader perhaps) and would love to know about them.