As title, all data is loaded into the grid instance properly, and the following configuration except the datatype works for another grid instance which has live ajax connection to remote data source is applied.
datatype: 'local',
gridview: true,
loadonce: true,
viewrecords: true
After clicking on any column header to perform sorting, all grid data is lost. Please advise.
You should almost never use the methods like
addXMLDataandaddJSONData. The methods will be frequently misunderstood. If you have local data you should usedatatype: 'xmlstring'(ordatatype: 'jsonstring') instead and the XML input for the grid provide using thedatastrparameter.By the way the value for the
datastrparameter must be not onlystring. You can useXMLDOMDocumentorDOMParserobject for example as the input of the value fordatastrin case ofdatatype: 'xmlstring'. In case of usagedatatype: 'jsonstring'it can be an object which represent the JSON data.