wpf-devexpress-dot-xpf-dot-grid-dbfe6d45.md
A base class that provides necessary functionality for custom localizers of the Data Grid control.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public class GridControlLocalizer :
DXLocalizer<GridControlStringId>
Public Class GridControlLocalizer
Inherits DXLocalizer(Of GridControlStringId)
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.
This example uses the GridControlLocalizer to replace the following GridControl‘s strings:
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");
}
}
Public Partial Class MainWindow
Inherits Window
Public Sub New()
' ...
End Sub
Private Shared Sub New()
GridControlLocalizer.Active = New CustomDXGridLocalizer()
End Sub
End Class
Public Class CustomDXGridLocalizer
Inherits GridControlLocalizer
Protected Overrides Sub PopulateStringTable()
MyBase.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")
End Sub
End Class
Object XtraLocalizer XtraLocalizer<GridControlStringId> DXLocalizer<GridControlStringId> GridControlLocalizer
See Also