jQWidgets Forums
Forum Replies Created
-
Author
-
Thank you Peter,
I’ve read through the TreeGrid documentation at http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxtreegrid/jquery-treegrid-data-sources.htm , and especially concentrated on the Data Sources section (‘Data Binding to Nested JSON’ and ‘Data Binding to JSON’).I also have a basic prototype working with nested JSON in my project, and thus far it’s working quite well. Many compliments on your treegrid.
I wanted to know more specifically if there’s a preferred JSON format for the grid (flat JSON vs. nested JSON), but I cannot glean any information from the documentation.
In any case, it might be more efficient to prepare my JSON data in a nested format in order to save the grid additional parsing work. I say that based on this line:
“Items in the data source must contain information on the parent-child relationships. Using this information, the TreeGrid will create records and organize them into a hierarchical structure.”
Anyhow, thanks for your response once again.
best regards,
Bob
September 30, 2014 at 3:47 pm in reply to: Angular treegrid issue with dataAdapter object Angular treegrid issue with dataAdapter object #60379working on a jsfiddle example for future reference, but cannot get it to run: http://jsfiddle.net/robertmazzo/8vhnz0Lr/5/
September 30, 2014 at 3:04 pm in reply to: Angular treegrid issue with dataAdapter object Angular treegrid issue with dataAdapter object #60372Yes, thanks Peter. That worked after defining the “children” as an array type. See the dataFields property below :
var source = { dataType: "json", dataFields: [ { "name": "id", "type": "number" }, { "name": "field0", "type": "string" }, { "name": "field1", "type": "number" }, { "name": "field2", "type": "number" }, { name: 'children', type: 'array' }, ], hierarchy: { root: 'children', type: 'array' }, id: 'id', localData: myData };
September 30, 2014 at 2:11 pm in reply to: Angular treegrid issue with dataAdapter object Angular treegrid issue with dataAdapter object #60370Hi Peter,
I just assume that my Json data would be too large for this forum. I’ve also tried to get a jsfiddler working, but find it a bit difficult to get it running (however I’ll keep trying).
thank you for your response. I’ll try type: array.September 30, 2014 at 2:33 am in reply to: Angular treegrid issue with dataAdapter object Angular treegrid issue with dataAdapter object #60285 -
AuthorPosts