Back to Devexpress

ShowingEditorEventArgs Class

wpf-devexpress-dot-xpf-dot-grid-d8dcd3f3.md

latest2.5 KB
Original Source

ShowingEditorEventArgs Class

Provides data for the GridViewBase.ShowingEditor event.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public class ShowingEditorEventArgs :
    ShowingEditorEventArgsBase
vb
Public Class ShowingEditorEventArgs
    Inherits ShowingEditorEventArgsBase

ShowingEditorEventArgs is the data class for the following events:

Remarks

The following example shows how to disable GridControl rows based on their values.

View Example: Disable Rows Based on Their Values

csharp
void OnEditorShowing(object sender, ShowingEditorEventArgs e) {
    if(e.Column.FieldName != nameof(Item.AllowEdit))
        e.Cancel = !(AssociatedObject.DataControl.CurrentItem as Item).AllowEdit;
}
vb
Private Sub OnEditorShowing(ByVal sender As Object, ByVal e As ShowingEditorEventArgs)
    If e.Column.FieldName <> NameOf(Item.AllowEdit) Then e.Cancel = Not (TryCast(AssociatedObject.DataControl.CurrentItem, Item)).AllowEdit
End Sub

Refer to the Assign Editors to Cells topic for more information.

Inheritance

Object EventArgs RoutedEventArgs EditorEventArgsBase ShowingEditorEventArgsBase ShowingEditorEventArgs

See Also

ShowingEditorEventArgs Members

DevExpress.Xpf.Grid Namespace