Back to Devexpress

DialogEditFormBehavior.KeyProperty Property

wpf-devexpress-dot-xpf-dot-grid-dot-dialogeditformbehavior-47880a10.md

latest2.7 KB
Original Source

DialogEditFormBehavior.KeyProperty Property

Gets or sets a key field that you can use to find rows during edit operations.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public string KeyProperty { get; set; }
vb
Public Property KeyProperty As String

Property Value

TypeDescription
String

A key field.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the KeyProperty 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-implement-crud-operations/CS/CodeBehind/EntityFramework/InstantFeedbackMode/MainWindow.xaml#L46

xml
<dxmvvm:Interaction.Behaviors>
    <dxg:DialogEditFormBehavior x:Name="EditFormBehavior" KeyProperty="Id"
                                CreateEditItemViewModel="OnCreateEditEntityViewModel" ValidateRow="OnValidateRow"

wpf-data-grid-extend-crud-operations/CS/DetailCollectionEditing/MainWindow.xaml#L36

xml
<dxmvvm:Interaction.Behaviors>
    <dxg:DialogEditFormBehavior x:Name="EditFormBehavior" KeyProperty="Id" CreateEditItemViewModelCommand="{Binding CreateEditEntityViewModelCommand}" ValidateRowCommand="{Binding ValidateRowCommand}" ValidateRowDeletionCommand="{Binding ValidateRowDeletionCommand}">
        <dxg:DialogEditFormBehavior.EditTemplate>

See Also

DialogEditFormBehavior Class

DialogEditFormBehavior Members

DevExpress.Xpf.Grid Namespace