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

DataViewBase.RuntimeLocalizationStrings Property

Gets or sets the collection of resource strings that can be localized at runtime. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public GridRuntimeStringCollection RuntimeLocalizationStrings { get; set; }

Property Value

Type Description
DevExpress.Xpf.Grid.GridRuntimeStringCollection

A DevExpress.Xpf.Grid.GridRuntimeStringCollection object that contains resource strings that can be localized at runtime.

Remarks

Individual default strings displayed within the grid (e.g. group panel text, the column chooser’s caption, etc.) can be changed at runtime. To translate individual resource strings at runtime, create a DevExpress.Xpf.Grid.RuntimeStringIdInfo object with the specified Id and Value properties, and add it to the View’s RuntimeLocalizationStrings collection. The Id property identifies the required resource string. The Value property specifies a new value for it.

Example

This example shows how to change default strings displayed within the Group Panel and the Column Chooser's caption, at runtime.

View Example

<Window x:Class="WpfApplication24.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid>
        <dxg:GridControl AutoPopulateColumns="True" Name="gridControl1">
            <dxg:GridControl.View>
                <dxg:TableView Name="tableView1" ShowTotalSummary="True">
                    <dxg:TableView.RuntimeLocalizationStrings>
                        <dxg:GridRuntimeStringCollection>
                            <dxg:RuntimeStringIdInfo Id="GridGroupPanelText" Value="Group Panel"/>
                            <dxg:RuntimeStringIdInfo Id="ColumnChooserCaption" Value="Hidden Columns"/>
                        </dxg:GridRuntimeStringCollection>
                    </dxg:TableView.RuntimeLocalizationStrings>
                </dxg:TableView>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RuntimeLocalizationStrings property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also