FlexGrid for WinForms
TopRow Property (C1FlexGridBase)

Gets or sets the first visible row in the scrollable area.
Public Property TopRow As Integer
Dim instance As C1FlexGridBase
Dim value As Integer
instance.TopRow = value
value = instance.TopRow
public int TopRow {get; set;}
property int TopRow {
   int get();
   void set (    int value);

Setting the 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 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 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 LeftCol and TopRow properties may correspond to partially visible rows or columns.

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

To ensure that a given cell is visible, use the ShowCell(Int32,Int32) method.


Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


C1FlexGridBase Class
C1FlexGridBase Members



Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback