Hello,
I'm developing a MVC5 page which contains 5 Syncfusion grids (partial views) that are loaded dynamically via ajax.
If I follow the js/api/grid example, the InsertURL/UpdateURL/DeleteURL are lost (code below)
<script>
// Create grid object.
var gridObj = $("#Grid").data("ejGrid");
// Refreshes the grid data source
gridObj.dataSource(data);
</script>
So I chose to manually set the datamanager's json after the ajax call ended:
success: function (result1) {
var obj1 = $("#Grid").ejGrid("instance")
// Retrieves the datasource and overwrites only the json array (doesn't overwrite the Insert/Update/Delete URL)
obj1._dataManager.dataSource.json = result1;
obj1.refreshContent();
}
Doing that, the grid works fine but the ExcelFilter stops working.
Everytime the user clicks the filter button, js console shows the message "ej.web.all.min.js:59911 Uncaught TypeError: Cannot read property 'width' of null"
Inspecting the "ej.web.all.min" js file, apparently the "_dialogContainer" is null as shown below:
y = this._isExcelFilter ? this._excelFilter._dialogContainer.width() : y;
Could you provide an example that dynamically loads syncfusion grids (which are partial views) and doesn't overwrite the Insert/Update/Delete URLs/ExcelFilter?
Thanks in advance.