Hey guys,
I'm having trouble making the filters work when search is active on the grid.
I setup my grid like that
ngOnInit() {
this.filter = {type: 'CheckBox'/*, columns: [{field: 'State', matchCase: false, operator: 'equal', predicate: 'and', value: 'true'}]*/};
this.filterSettings = {
type: 'Menu',
columns: [{field: 'Active', matchCase: true, operator: 'equal', predicate: 'and', value: true}]
};
this.toolbar = ['Search'];
this.data = new DataManager({
url: `${this.baseUrlApi}/api/crm/PersonnesView`,
adaptor: this.oDataAdaptor
});
}
So it got both search and filters. My html looks like this :
<ejs-grid #grid [allowFiltering]='true' [allowPaging]='true' [allowSelection]='false' [allowSorting]='true'
[dataSource]='data' [enableHover]='true' [filterSettings]='filterSettings' [pageSettings]='pageSettings'
[toolbar]='toolbar'>
<e-columns>
<e-column field="IdIndividu" headerText="Id"></e-column>
<e-column field="Nom" headerText="Nom"></e-column>
<e-column field="Prenom" headerText="Prénom"></e-column>
<e-column [filter]='filter' field="Active" headerText="Actif"></e-column>
<e-column [filter]='filter' field="Etat" headerText="Etat"></e-column>
</e-columns>
</ejs-grid>
Somehow with that code, when i'm filtering as i have no search i see checkboxes for my field active set to "true" and "false". When i've done a search, nothing is displayed even if the result of the request done when i clicked on the filters is exactly the same.
On the server side there is a classic OData v4 developped in ASP .NetCore
Attached are the results of the filter window with or without search
Thanks for the help
Attachment:
Pictures_9fe4f37c.7z