Hello All
I want to add data to the data source of igtree using a for loop
My nodes are gonna be Well #1, Well #2 and their child being Stage #1, Stage #2 and so one so forth.
Can anyone help me include a for loop in the following format:
var data = [ { "Text": "xyz", "Value": "1", "Wells": [ { "Text": "Well #1", "Value": "11", "Stages": [ { "Text": "Stage #1", "Value": "111" }, { "Text": "Stage #2", "Value": "112"}] }, { "Text": "Well #2", "Value": "12", "Stages": [ { "Text": "Stage #1", "Price": "121" }, { "Text": "Stage #2", "Price": "122"}] } ] }];
Hi Aditya,
Is your objective to add nodes to the igTree data source? If yes, these forum posts discusses this and perhaps will help you to address this: http://ko.infragistics.com/community/forums/t/64875.aspx AND http://ko.infragistics.com/community/forums/t/65356.aspx
Or, is your object to mainly add Name: Value pairs to your json? If so, there are a few posts on Stack Overflow that may help. This one for example: http://stackoverflow.com/questions/7255058/how-to-loop-through-add-pairs-of-values-to-json-object
If neither, can you provide some context to understand your overall objective? Including a small sample also can help to see what you are needing to do. Thanks!
Hello Troy:
I basically wish to add x number of stages and variable number of events under each of them. Also I would like to plot them using callback.
Will value and name be enough for callback?
Could you suggest me a callback example too?
Thanks,
Aditya.