Back to Devexpress

DataControlBase.UseFieldNameForSerialization Property

wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-4f34092e.md

latest2.4 KB
Original Source

DataControlBase.UseFieldNameForSerialization Property

Gets or sets whether to use the column’s field name for serialization. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool UseFieldNameForSerialization { get; set; }
vb
Public Property UseFieldNameForSerialization As Boolean

Property Value

TypeDescription
Boolean

true to use the column’s field name for serialization; otherwise, false.

|

Remarks

By default, the value of the column’s ColumnBase.FieldName property is used as the column’s name for serialization, if the Name property is not specified. This behavior can be disabled by setting the UseFieldNameForSerialization property to false.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UseFieldNameForSerialization 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.

wpf-data-grid-save-layout-and-restore-it-from-memory-stream/CS/DXGrid_GridLayout/Window1.xaml#L17

xml
dxg:GridSerializationOptions.RemoveOldColumns="False"
             UseFieldNameForSerialization="True">
<dxg:GridColumn FieldName="IssueName"/>

See Also

DataControlBase Class

DataControlBase Members

DevExpress.Xpf.Grid Namespace