Can I access local xml files as data in jqgrid?
A:
You want to access an XML file stored on the client's machine via Javascript? I don't think that can be done.
The more common scenario is pulling your XML via an AJAX call. I'd also look at the "local" option on the jqgrid wiki... you could embed your data as JSON/XML in the HTML page and read it in when setting up your jqgrid.
jtgameover
2010-06-16 05:21:16
setting the local option means the data has to be an Array. How does it works on a plain XML?
prem
2010-06-16 05:57:35
A:
You can load the contain of the xml file in a string variable and use datatype: 'xmlstring'
(see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#xml_string). It will work.
Oleg
2010-06-16 11:43:43