Hi Customer,
Thanks for contacting Syncfusion support.
We have provided the direct support to remove/localize the default items of filter drop down from the version v4.2.x.x. In order to modify the default text of “(All)”/” (Custom)”/” (Empty)” in filter dropdown, the GridTableFilterBarCelModel can be used. The SelectAllText/SelectCustomText/SelectEmptyText properties can be used to set the custom/localized string instead of “All/Custom/Empty” respectively. Moreover, the AllowCustomFilter and AllowEmptyFilter properties of FilterRowOptions can be disabled to remove the items from the drop down. Please make use of below code and sample,
Code example
foreach(GridColumnDescriptor column inthis.gridGroupingControl1.TableDescriptor.Columns)
{
column.AllowFilter = true;
//To disable the "Custom" item from the dropdown of the filterbar cell
column.FilterRowOptions.AllowCustomFilter = false;
//To disable the "Empty" item from the dropdown of the filterbar cell
column.FilterRowOptions.AllowEmptyFilter = false;
}
//To get the FilterBarCellModel
GridTableFilterBarCellModel model =this.gridGroupingControl1.TableModel.CellModels["FilterBarCell"] asGridTableFilterBarCellModel;
//To set the custom text for "All"
model.SelectAllText = "LocalizedAllText";
//To set the custom text for "Custom"
model.SelectCustomText = "LocalizedCustomText";
//To set the custom text for "Empty"
model.SelectEmptyText = "LocalizedEmptyText";
|
Note
Please let us know your product version, if you could not avail this support. So that, we could provide you the best solution at the earliest.
Regards,
Arulpriya