wpf-devexpress-dot-xpf-dot-grid-dot-gridcontrol-dot-isvalidrowhandle-x28-system-dot-int32-x29.md
Indicates whether the specified row handle is valid.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool IsValidRowHandle(
int rowHandle
)
Public Function IsValidRowHandle(
rowHandle As Integer
) As Boolean
| Name | Type | Description |
|---|---|---|
| rowHandle | Int32 |
An integer value that specifies the row’s handle.
|
| Type | Description |
|---|---|
| Boolean |
true if the specified row handle is valid; otherwise, false.
|
An invalid row handle corresponds to a row which doesn’t exist in a View. Its handle is returned by the DataControlBase.InvalidRowHandle property. To learn more, see Identifying Rows and Cards.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsValidRowHandle(Int32) method.
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-obtain-rows-visible-on-screen/CS/IScrollInfoSample/Window1.xaml.cs#L29
var handle = grid.GetRowHandleByVisibleIndex(i);
if (!grid.IsValidRowHandle(handle))
continue;
bool isExpanded = (bool)obj.GetType().GetProperty(args.PropertyName).GetValue(obj, null);
if(this.AssociatedObject.IsValidRowHandle(rowHandle)) {
node.IsExpanded = isExpanded;
wpf-data-grid-obtain-rows-visible-on-screen/VB/IScrollInfoSample/Window1.xaml.vb#L30
Dim handle = Me.grid.GetRowHandleByVisibleIndex(i)
If Not Me.grid.IsValidRowHandle(handle) Then Continue For
Dim item = TryCast(Me.grid.GetRow(handle), Item)
Dim isExpanded As Boolean = CBool(obj.GetType().GetProperty(args.PropertyName).GetValue(obj, Nothing))
If Me.AssociatedObject.IsValidRowHandle(rowHandle) Then
node.IsExpanded = isExpanded
See Also