Hi!
If the getstate method will be invoked in the beforeprocessing method then the jqxGrid control will be broken.
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> </title>
<link rel="stylesheet" href="styles/jqx.base.css"/>
<script type="text/javascript" src="scripts/jquery-1.10.2.min.js"> </script>
<script type="text/javascript" src="scripts/jqx-all.js"> </script>
<script type="text/javascript">
$(document).ready(function () {
var source =
{
datatype: "jsonp",
datafields: [
{ name: 'countryName', type: 'string' },
{ name: 'name', type: 'string' },
{ name: 'population', type: 'float' },
{ name: 'continentCode', type: 'string' }
],
url: "http://ws.geonames.org/searchJSON",
beforeprocessing: function() {
var state = $('#grid').jqxGrid('getstate');
}
};
var dataAdapter = new $.jqx.dataAdapter(source);
$('#grid').jqxGrid({
source: dataAdapter,
columns: [
{ text: 'Country', dataField: 'countryName', width: '50%' },
{ text: 'City', dataField: 'name', width: '50%' }
]
});
});
</script>
</head>
<body>
<div id="grid"></div>
</body>
</html>
Best regards, Yuri Antipin.