Skip to main content

GridControlLocalizer Class

A base class that provides necessary functionality for custom localizers of the Data Grid control.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public class GridControlLocalizer :
    DXLocalizer<GridControlStringId>

Remarks

Note

Important: Not all strings can be translated via Localizer classes. Some components contain form resources (e.g., the XtraReports Search dialog), and the only way to translate them is to create satellite assemblies. Thus, localization via resources is the preferable solution.

Example

This example uses the GridControlLocalizer to replace the following GridControl‘s strings:

  • Customize… → Customize Totals
  • Totals for ‘Column Name’ → Totals Editor
  • Items → Summary Items

WPF Data Grid - GridControlLocalizer

View Example: Use the GridControlLocalizer Class to Localize the Grid

public partial class MainWindow : Window {
    public MainWindow() {
        // ...
    }
    static MainWindow() {
        GridControlLocalizer.Active = new CustomDXGridLocalizer();
    }
}
public class CustomDXGridLocalizer : GridControlLocalizer {
    protected override void PopulateStringTable() {
        base.PopulateStringTable();
        // Changes the caption of the menu item used to invoke the Total Summary Editor.
        AddString(GridControlStringId.MenuFooterCustomize, "Customize Totals");

        // Changes the Total Summary Editor's default caption.
        AddString(GridControlStringId.TotalSummaryEditorFormCaption, "Totals Editor");

        // Changes the default caption of the tab page that lists total summary items.
        AddString(GridControlStringId.SummaryEditorFormItemsTabCaption, "Summary Items");
    }
}
See Also