FlexGrid for WinForms | ComponentOne
C1.Win.FlexGrid Namespace / C1FlexGrid Class / TopRow Property

In This Topic
    TopRow Property (C1FlexGrid)
    In This Topic
    Gets or sets the first visible row in the scrollable area.
    Syntax
    'Declaration
     
    
    Public Property TopRow As Integer
    public int TopRow {get; set;}
    Remarks

    Setting the C1FlexGridBase.TopRow property causes the grid to scroll vertically so that the given row becomes the topmost visible row. This is often useful when you want to synchronize two or more grids so that when one of them scrolls, the other scrolls as well. To scroll horizontally, use the C1FlexGridBase.LeftCol property.

    When setting this property, the largest possible row number is the total number of rows minus the number of rows that will fit the display. Attempting to set C1FlexGridBase.TopRow to a greater value will cause the grid to set it to the largest possible value (no error will occur).

    The value returned by the C1FlexGridBase.LeftCol and C1FlexGridBase.TopRow properties may correspond to partially visible rows or columns.

    Use the C1FlexGridBase.LeftCol and C1FlexGridBase.TopRow properties to scroll using cells as units. Use the C1.Win.FlexGrid.Util.BaseControls.ScrollableControl.ScrollPosition property to scroll the grid using pixel units.

    To ensure that a given cell is visible, use the C1FlexGridBase.ShowCell method.

    See Also