Last Updated:
25 Mar 2022 11:03
by Priya
When I selected a product and then edited something in the product infomodal and then presses save, the filters applied in the productsgrid is dropped
$.ajax({
url: "/ProductRowInfoSite/SaveParameters",
data: {
data: dataString
},
dataType: "json",
// "jsonp" is required for cross-domain requests; use "json" for same-domain requests
success: function (result) {
// notify the data source that the request succeeded
//options.success(result);
self._store.dispatch({ type: ActionProductInfoWindow.Saving });
$("#productGridId").data("kendoGrid").saveChanges();
// $(self._parent + " " + "#productWindowGridId").data("kendoGrid").saveChanges();
if ($ (self._parent === "#productGridId")) {
$("#productGridId").data("kendoGrid").dataSource.read();
}
self._parent.refreshParentGrids();
//var dataSource = $("#productGridId").data("kendoGrid").dataSource;
//var filters = dataSource.filter();
//var allData = dataSource.data();
//var query = new kendo.data.Query(allData);
//var data = query.filter(filters).data;
//$("#productGridId").data("kendoGrid").dataSource = data;
//let productGrid = $("#productGridId").data("kendoGrid");
//productGrid.dataSource.read();
},
error: function (result) {
displayAjaxError(result);
},
type: 'POST'
});