We have our own AJAX / DB mechanisms in place, and we would


We have our own <?xml:namespace prefix = st1 /><st1:City w:st=“on”><st1:place w:st=“on”>AJAX</st1:place></st1:City> / DB mechanisms in place, and we would like to just load our Javascript XML Dom object directly into the grid. Is there a function that will allow us to do this? I know it will break the dynamical loading, but that’s ok for now.  If the user then edit’s values, would the grid be editing the same XML Dom object, so we can then use our own mechanism to send it back to the server for processing?  I remember seeing a .loadObject method in the API, but there wasn’t any documentation on what it does…perhaps this is what I can use to load my own XML Dom?



To put my question in Java / SWING terms: is it possible to set and get the grid’s data model and will the grid’s view directly change my model, or is there some kind of internal model?

I don’t mind having to use an XML model, or some other data structure, like JS arrays.

Does the .addRow method make internal copies of the row data, or is it just using references to the array used in the call?





Thanks.





>>we would like to just load our Javascript XML Dom object directly into the grid

You can load an XMLDom object directly to grid parser by
grid.parseXML(XMLDocObject);
This functionality must work for any static mode without any back side effects.




>>is it possible to set and get the grid’s data model and will the grid’s view directly change my model, or is there some kind of internal model?

Grid doesn’t use XMLObject as inner model, it uses data from it to create a HTML layout and store most data directly within HTML.
If you want to get the state of all grid you can use
grid.serialize()
Which returns the grid model as XML string ( not object ) , the format of XML is exactly the same as used for grid initialization
( It also possible to get it as text in CSV format by grid.serializeToCSV() )




>>Does the .addRow method make internal copies of the row data

It creates an internal copy