Skip to main content

FilterUIElementResXLocalizer Class

Allows you to localize filter menu elements.

Namespace: DevExpress.Utils.Filtering.Internal

Assembly: DevExpress.Data.v24.1.dll

NuGet Package: DevExpress.Data

Declaration

public class FilterUIElementResXLocalizer :
    XtraResXLocalizer<FilterUIElementLocalizerStringId>

Remarks

The example below illustrates how to localize an Excel-style filtering menu for the Data Grid. Localized strings are provided by the FilterUIElementLocalizerStringId enumeration.

//define a localizer
public class CustomFilterUIElementLocalizer : FilterUIElementResXLocalizer
{
    public CustomFilterUIElementLocalizer() { }
    public override string GetLocalizedString(FilterUIElementLocalizerStringId id)
    {
        string ret = "";
        switch(id)
        {
            case FilterUIElementLocalizerStringId.FilteringUIClearFilter:
                ret = "Filter löschen";
                break;
            case FilterUIElementLocalizerStringId.FilteringUIClose:
                ret = "Schließen";
                break;
            default:
                ret = base.GetLocalizedString(id);
                break;
        }
        return ret;
    }
}

//set a custom localizer
public Form1()
{
    InitializeComponent();
    FilterUIElementResXLocalizer.Active = new CustomFilterUIElementLocalizer();
    gridView1.OptionsFilter.ColumnFilterPopupMode = ColumnFilterPopupMode.Excel;
}

Inheritance

Object
XtraLocalizer
XtraLocalizer<FilterUIElementLocalizerStringId>
DevExpress.Utils.Localization.XtraResXLocalizer<FilterUIElementLocalizerStringId>
FilterUIElementResXLocalizer
See Also