Hi Youcef,
Greetings from Syncfusion support.
Based on your requirement you want to display both true and false options in the filter dialog box even if the rows in the grid does not contain any of the values. By default the options in the filter dialog box will be displayed based on the unique values in each fields of the dataSource. If the grid is already filtered based on an another column then the already filtered data will be stored as the `existingPredicate` which will filter the dataSource and display the filtered values in the filter dialog box.
You can achieve your requirement by changing the dataSource to your custom dataSource in the `actionBegin` event of the EJ2 Grid. Using this fix may cause complexities when you do filtering in multiple columns before opening the custom filter dialog box will result in the filter dialog box displaying `No Matches Found`. We have also shared the sample for your reference.
Please refer the code example below:
actionBegin(args) {
if (
args.requestType === 'filterbeforeopen' &&
args.columnName === 'verified'
) {
args.filterModel.options.dataSource = [
{ verified: true },
{ verified: false }
];
}
}
|
Please find the attached sample and revert for more queries.
Regards,
Joseph I