We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

EJGrid Filter and Sort not reloading

Hi
I have a gird that on the first load runs fine and all the options load and work but if you reload the grid with fresh data then none of the options load (allowFiltering, allowSorting).
Im getting no error messages at all and can't figure out why its doing this??
ReportService.contractors(_entry)
.then(function (data) {
$("#contractorsGrid").ejGrid({
dataSource: data,
isResponsive: true,
allowScrolling: true,
allowFiltering: true,
allowSorting: true,
columns: [
{ field: "userDispName", headerText: 'Employee Name', textAlign: ej.TextAlign.Left, width: 15 },
{ field: "prjCode", headerText: 'Project Code', textAlign: ej.TextAlign.Center, width: 10 },
{ field: "activDesc", headerText: 'Activity', textAlign: ej.TextAlign.Center, width: 15 },
{ field: "hours", headerText: 'Hours', textAlign: ej.TextAlign.Center, width: 7 },
{ field: "isApproved", headerText: 'Approved', textAlign: ej.TextAlign.Center, width: 7 },
{ field: "managerName", headerText: 'Manager Name', textAlign: ej.TextAlign.Left, width: 15 },
{ field: "deptName", headerText: 'Department', textAlign: ej.TextAlign.Left, width: 15 },
{ field: "weekNo", headerText: 'Week No', textAlign: ej.TextAlign.Left, width: 10 },
{ field: "entryDate", headerText: 'Entry Date', textAlign: ej.TextAlign.Left, width: 15 },
{ field: "weekDay", headerText: 'Week Day', textAlign: ej.TextAlign.Left, width: 15 }
]
});

1 Reply

MS Mani Sankar Durai Syncfusion Team July 22, 2016 12:39 PM UTC

Hi Dee, 

Thanks for contacting Syncfusion support. 
 
We have analyzed your query and we are not able to reproduce the reported issue.  
 
In the below code, we have bound datasource at initial load and in button click event we have bound another datasource for grid. 

For your convenience please refer the below code example, 

<button id="Remove">Remove</button><br /> 
  <script type="text/javascript"> 
        $(function () { 
var dataManger = new ej.DataManager({ 
                url: "http://mvc.syncfusion.com/Services/Northwnd.svc/Orders/" 
            }); 
         …    
.then(function (e) { 
                $("#Grid").ejWaitingPopup("hide") 
                $("#Grid").ejGrid({ 
 
                 dataSource: e.result, 
                    allowPaging: true, 
 
 
}); 
        }); 
 
 
  $("#Remove").ejButton({ 
            type: "button", 
            click: function (args) {             
                 var grid = $(".e-grid").ejGrid("instance"); 
              var dataManger = new ej.DataManager({ 
                    url: "http://mvc.syncfusion.com/Services/Northwnd.svc/Employees/" 
                }); 
                grid.model.columns = [{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 90 }, 
                ]; 
                grid.dataSource(dataManger);         
     } 
}); 
 

We have prepared a sample based on your requirement and please find in the below link, 

If you still face the issue please get back to us with the following details, 
1.       Share the code snippet that you have tried to reload the grid data? 
2.       Issue replication procedure. 
3.       Reproduce the issue in the above given sample. 
4.       Full video of the issue or screen shot of the issue you have faced. 
5.       Grid rendering code  
The provided information will help us to analyze the issue and provide you the response as early as possible. 

Regards, 
Manisankar Durai 


Loader.
Live Chat Icon For mobile
Up arrow icon