Hi Team,
Please help on below issue.
I am concatenating the resources names in the grid but i don't want to show the concatenate values inside the filter. Could you please help me resolve this issue. I have tried so many ways like filtertemplate , filter but it is not resolving my issue.
|
constructor() {
super(...arguments);
// ‘Labels’ here is the column field where custom data source is to be set
this.filterData = [
{ Labels: 'Label1' },
{ Labels: 'Label2' },
{ Labels: 'Label3' },
{ Labels: 'Label4' },
{ Labels: 'Label5' }
];
}
// Grid’s actionBegin event handler
actionBegin(args) {
if (args.requestType === 'filterbeforeopen' && args.columnName === 'Labels') {
// Modifying filter datasource
args.filterModel.options.dataSource = this.filterData;
}
} |
|
// Grid’s actionBegin event handler
actionBegin(args) {
// Check if the required column is getting filtered
if (args.requestType === "filtering" && args.currentFilteringColumn === "Labels") {
// Filter operator is changed for the ‘Labels’ column in the filter columns model
args.columns.forEach(col => {
if (col.field === "Labels")
col.operator = "contains"
})
}
} |