Grid - JSON: Additional Attribute retrive issue


Hello,



Thanks for you quick support. I included dhtmlxgrid_json.js file and row styles and cell styles are working fine. Again, I could not able to retrieve the additional attribute/parameter value with below code.



My JSON:



data={rows:[<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>



       {id:100, 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”}]},<o:p></o:p>



                   {id:2, style:“color:green;”, userdata:{“name1”:“xyz||abc||123||@#$”}, data:[“20”, {“value”:“Row 2 - Column 2”, style:“color:red”}, “Row 2 - Column 3”]}<o:p></o:p>



                ]}<o:p></o:p>



Rertrive function:



function showAttribute() {<o:p></o:p>



    alert(mygrid.getRowAttribute(100, ‘name1’));<o:p></o:p>



}<o:p></o:p>



Please let me know your thoughts.



Thanks,



RamaRao R.


Hello


userdata isn’t set as an attribute.


Please use getUserData method to get it:


function showAttribute() {

alert(mygrid.getUserData(100, ‘name1’));

}