Back to Devexpress

GridRowValidationEventArgs.RowHandle Property

wpf-devexpress-dot-xpf-dot-grid-dot-gridrowvalidationeventargs-09076e04.md

latest3.1 KB
Original Source

GridRowValidationEventArgs.RowHandle Property

Gets the processed row’s handle.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public virtual int RowHandle { get; }
vb
Public Overridable ReadOnly Property RowHandle As Integer

Property Value

TypeDescription
Int32

An integer value that specifies the processed row’s handle.

|

Remarks

To learn more, see Row Validation and Identifying Rows and Cards.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RowHandle 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-initialize-new-item-row-with-default-values/CS/NewItemRow_CodeBehind/MainWindow.xaml.cs#L41

csharp
void OnValidateRow(object sender, GridRowValidationEventArgs e) {
    if(e.RowHandle == GridControl.NewItemRowHandle) {
        e.IsValid = !string.IsNullOrEmpty(((Product)e.Row).ProductName);

wpf-data-grid-initialize-new-item-row-with-default-values/VB/NewItemRow_CodeBehind/MainWindow.xaml.vb#L46

vb
Private Sub OnValidateRow(ByVal sender As Object, ByVal e As GridRowValidationEventArgs)
    If e.RowHandle = DataControlBase.NewItemRowHandle Then
        e.IsValid = Not String.IsNullOrEmpty(CType(e.Row, Product).ProductName)

See Also

Identify Rows and Cards

GridRowValidationEventArgs Class

GridRowValidationEventArgs Members

DevExpress.Xpf.Grid Namespace