Grid with JS Array and JSON data formats


Hello,<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>



I am working on Grid, as per our application data model I have to go with JS Array or JSON formats only. In my evaluation, I am looking for your thoughts on:<o:p></o:p>



1.       How to specify ID explicitly in Array data?<o:p></o:p>



2.       How to provide additional parameter/attribute to the row in JS Array data and JSON?  I checked XML additional attribute format but I could not able to apply to JS Array and JSON data formats.<o:p></o:p>



3.       How to add font color/style and background color to the ROW and CELL in the JS Array and JSON?



Please let me know your thoughts and send the complete data formats of JS Array and JSON.<o:p></o:p>



<o:p> </o:p>



Thanks,<o:p></o:p>



RamaRao R.<o:p></o:p>


Hello


loading from jsarray allows to pass only cell values. There isn’t a opportunity to pass row ids or some other attributes.


json loading is much more flexible. You can load the same attributes and tags as in case of xml loading.


The example of setting style attribute for a row and a cell:


data={
rows:[
{ id:1,
style:“color:red”,
data:[
“some value in the 1st cell”,
{value:“some value in the 2nd cell”,style:“color:blue”},
“some value in the 1st cell”
]


}


]
}