Back to Devexpress

RowAllowEventArgs.Allow Property

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

latest2.5 KB
Original Source

RowAllowEventArgs.Allow Property

Gets or sets whether the operation is allowed.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDescription
Boolean

true to allow the operation; otherwise, false.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Allow 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-grid-prevent-expand-collapse-operations-for-group-rows/CS/Forbid_Expand_Collapse/MainWindow.xaml.cs#L27

csharp
if (e.Row != null && grid.GetGroupRowValue(e.RowHandle).Equals(InvoiceStatus.Invalidated))
        e.Allow = false;
}

wpf-grid-prevent-expand-collapse-operations-for-group-rows/VB/Forbid_Expand_Collapse/MainWindow.xaml.vb#L27

vb
Private Sub OnGroupRowCollapsing(ByVal sender As Object, ByVal e As RowAllowEventArgs)
    If e.Row IsNot Nothing AndAlso Me.grid.GetGroupRowValue(e.RowHandle).Equals(InvoiceStatus.Invalidated) Then e.Allow = False
End Sub

See Also

RowAllowEventArgs Class

RowAllowEventArgs Members

DevExpress.Xpf.Grid Namespace