Creating Columns Dynamically from Json

Hi,

Just starting out using the grid component, and I was wondering if you could load the columns in JSON as you can with XML?

If not then what is the best way to load columns dynamically while still using JSON for the data?

Thanks

Hanzs

Here is the example of grid init from JSON object.

[code]data={
“parent”:“gridbox”,
“image_path”:"…/…/codebase/imgs/",
“editable”:true,
“multiselect”:true,

“columns”:[{
“label”:“column A”,
“width”:50,
“align”:“right”,
“sort”:“str”,
“type”:“ed”
},
{
“label”:“column B”,
“width”:100,
“align”:“right”,
“sort”:“int”,
“type”:“ed”
},
{
“label”:“column C”,
“width”:120,
“align”:“right”,
“sort”:“int”,
“type”:“ed”
}]
}

data1={
“rows”:[{
“id”:1,
“data”:[“a”,“b”,“c”]
},
{
“id”:2,
“data”:[“a1”,“b1”,“c1”]
},
{
“id”:3,
“data”:[“a2”,“b2”,“c2”]
}
]
}

mygrid = new dhtmlXGridObject(data);
mygrid.setSkin(“web”);
mygrid.parse(data1,“json”)
[/code]
But unfortunately it’s not available to load grid’s configuration from JSON dynamically using dhtmlxGrid’s API,