Default filering in grid with DataManager

Hi,

I'm trying to run the default filter in my application. I use DataManager with UrlAdaptor to get data. When I reload the page, I will not be sent POST parameters with the name of the column I want to sort, even if I have set sortSettings. After clicking on the column header, the parameters are sent correctly

<ejs-grid [dataSource]="conferences"
[allowSorting]="true" [sortSettings]="sortSettings"
[allowFiltering]="true"
[allowPaging]="true">
</ejs-grid>
public conferences: DataManager;
public sortSettings: SortSettingsModel = {columns: [{field: 'id', direction: 'Ascending'}]};

constructor() {
}

ngOnInit(): void {
this.conferences = new DataManager({
url: 'model/conference/getMyConferences',
adaptor: new UrlAdaptor()
});
}

After init


After click on header column:



1 Reply

MS Manivel Sellamuthu Syncfusion Team July 26, 2021 10:17 AM UTC

Hi Lukas, 

Greetings from Syncfusion support. 

From your update we suspect that on initial rendering you are not getting the sorted columns details in the request while using the URL Adaptor. We have prepared the sample based on the code example shared and the sample is working fine at our end. Please find the below sample for your information. 


On initial rendering: 

 

If you still faced the issue, could you please share the below details, which will be helpful for us to validate further about issue. 

  1. Share your current  Syncfusion packages version and please check the reported issue with latest version
  2. Please try to replicate the reported issue in the given sample
  3. If possible, please share the issue replicable sample.
 
Regards, 
Manivel 


Loader.
Up arrow icon