We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change "(All)" string to other text on filter bar

Hi,

Can I change "(All)" to other text on filter bar of GridGroupingControl?

Thanks.

1 Reply

AR Arulpriya Ramalingam Syncfusion Team July 24, 2017 11:18 AM UTC

Hi Le,  
  
Thanks for using Syncfusion products.  
  
Yes, the “(All)” text can be modified in filter dropdown by using the CustomFilterBarCelModel and using SelectAllText property. Please make use of below code and sample,  
  

#region CustomFilterBarCellModel  
public class CustomFilterBarCelModel : GridTableFilterBarCellModel  
{  
    public CustomFilterBarCelModel(GridModel grid)  
        : base(grid)  
    {  
        //To change the "All" text  
        this.SelectAllText = "Sample";  
        //this.SelectCustomText = "Custom text";  
        //this.SelectEmptyText = "Some Text";  
    }  
}  
#endregion  
  
//Registering and adding cell model to Grid  
this.gridGroupingControl1.TableModel.CellModels["CustomFilterBarCell"] =newCustomFilterBarCelModel(this.gridGroupingControl1.TableModel.Model);  
this.gridGroupingControl1.TableDescriptor.Appearance.FilterBarCell.CellType = "CustomFilterBarCell";  
  
  
Screenshot  
  
   
  
Sample link: CustomFilterText   
  
Regards,  
Arulpriya  


Loader.
Live Chat Icon For mobile
Up arrow icon