Skip to main content
A newer version of this page is available. .

FilterUIElementResXLocalizer Class

Allows you to localize filter menu elements.

Namespace: DevExpress.Utils.Filtering.Internal

Assembly: DevExpress.Data.v20.2.dll

NuGet Packages: DevExpress.Data, DevExpress.WindowsDesktop.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
DevExpress.Utils.Localization.XtraLocalizer
XtraLocalizer<FilterUIElementLocalizerStringId>
DevExpress.Utils.Localization.XtraResXLocalizer<FilterUIElementLocalizerStringId>
FilterUIElementResXLocalizer
See Also