TopRowIndex Property
See Also
GridControl Control | FocusedRow Property

Description
The TopRowIndex property will either return the index of the topmost row or it will scroll a row until it is the topmost row in the Grid control view.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property TopRowIndex() As Long
Remarks
When setting a value to the TopRowIndex property, the system scrolls the Grid control view until either the item with the specified Index appears at the top of the view or the maximum scroll range has been reached. For example, if the item is the last item, it cannot be scrolled to the top, but it will be scrolled into view. This will force the row with the provided index to be the topmost row in the view.
When retrieving a value from the TopRowIndex property, the index of the topmost row is returned.
Example
TopRowIndex Sample (Visual Basic)
This sample illustrates how to use the TopRowIndex property to retrieve the index of the topmost row and to force a row to be the topmost row.
' Forces the row with index of 20 to be the topmost row in the grid view.
wndGridControl.TopRowIndex = 20
' Retrieves the index of the topmost row
Debug.Print "Index of top row: " & wndGridControl.TopRowIndex
See Also
GridControl Control | FocusedRow Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.