Categories | Question details Back To List | ||
Additional Attribute/Parameter and font color in JSON Hello, I tried to add a additional Attribute/Parameter and font color in JSON as shown below: data={rows:[ {id:1, selected:true, style:"color:red;", userdata:{"name1":"abc||123||@#$"}, data:["10", {"value":"Row 1 - Column 2", style:"color:blue"}, {"value":"Row 1 - Column 3","type":"ed"}]}, {id:2, style:"color:green;", userdata:{"name1":"xyz||abc||123||@#$"}, data:["20", {"value":"Row 2 - Column 2", style:"color:red"}, "Row 2 - Column 3"]} ]} mygrid.parse(data, "json"); With the above code - I could not able to see the data of where I specified ‘value’(2nd & 3rd columns of 1st row and 2nd column of 2nd row) and styles are also not applied to the cells and rows. and code for retrieve the additional attribute: function showAttribute() { alert(mygrid.getRowAttribute(1, 'name1')); } With the above code - I could not able to retrieve the additional parameter value. This code is working fine with xml data. Please let me know your views and is there other JS files need to include. Thanks, RamaRao R. Answer posted by Alex (support) on Jan 20, 2010 05:29 Please check that dhtmlxgrid_json.js is included. |