Hello,
I'm using the "persist State" method (ASP MVC mode)
Everything works fine but when I use the Grid Event in order to save and load automatically (.Filter("onFiltering"),.DataBinding("onDataBinding")...), I've a javascript error (grid is undefined. Jquery not supported in javascript function I suppose...)
function
onFiltering(e) {
//alert("onFiltering activé"); works
var
grid = $(
"#Grid"
).data(
"kendoGrid"
);
e.preventDefault();
localStorage[
"kendo-grid-options"
] = kendo.stringify(grid.getOptions());
return
(localStorage[
"kendo-grid-options"
]);
};
function
onDataBinding(e) {
//alert("onDataBinding activé");
var
grid = $(
"#Grid"
).data(
"kendoGrid"
);
e.preventDefault();
var
options = localStorage[
"kendo-grid-options"
];
if
(options) {
grid.setOptions(JSON.parse(options));
}
};
So any idea to include jquery function /or convert jquery to js?
thanks!!