Looking to transform the data coming from the backend, specifically mapping a user's status which is represented as a number to its corresponding string value.
Considered using typescript for this mapping task, but it interferes with syncfusion's filtering functionality. Is there a way to preprocess the data before displaying it and perform the mapping without compromising on filtering?
Within user.component.html
<ej-grid id="Grid" #grid [dataSource]="datasource.infos" allowPaging="true"
allowFiltering="true">
<e-columns>
<e-column field="status" headerText="Status"></e-column>
</e-columns>
</ej-grid>
Inside user.component.ts
status = {
0:"None"
}
items: object;
ngOnInit() {
this.data.getUser().subscribe(data => {
this.datasource.infos.push(data)
this.items = this.datasource.infos;
})
}
In datasource.ts
infos: object[] = []
Seeking guidance on mapping the backend status values (such as the number 0 representing "none") while retaining the filtering feature. Custom column creation did not deliver the desired outcome as it disabled filtering for that column.
Your assistance is greatly appreciated.