Spread for ASP.NET 7.0 Product Documentation
TopRow Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : TopRow Property


Glossary Item Box

Gets or sets the row to display as the top row in the sheet.

Syntax

Visual Basic (Declaration) 
Public Property TopRow As Integer
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Integer
 
instance.TopRow = value
 
value = instance.TopRow
C# 
public int TopRow {get; set;}

Property Value

Integer row index

Remarks

This property is available at run time only.

Set this property to a row index to position that row next to the top edge of the sheet. The row index is zero-based.

When the top displayed row changes, the TopRowChanged event occurs.

Positioning a row using this property does not affect the position of the active cell.

The IgnoreHiddenRowsWhenPaging property should be false when using the TopRow property.

Example

The following example creates a sheet with 1000 rows and 7 columns. Alternate rows display a light cyan backcolor, and navy blue, bold text. The fifth row (0 index) is the starting row in the sheet.
C#Copy Code
FarPoint.Web.Spread.SheetView sv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.StyleInfo altrowstyle=new FarPoint.Web.Spread.StyleInfo();
FarPoint.Web.Spread.Model.DefaultSheetStyleModel altrowmodel=new FarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000,7);
sv.ColumnCount=7;
sv.RowCount=1000;
altrowstyle.BackColor=Color.LightCyan;
altrowstyle.ForeColor=Color.Navy;
altrowstyle.Font.Bold=true;
altrowmodel.SetDirectAltRowInfo(1,altrowstyle);
sv.StyleModel=altrowmodel;
sv.TopRow=4;
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim altrowstyle As New FarPoint.Web.Spread.StyleInfo()
Dim altrowmodel As New FarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000,7)
sv=FpSpread1.ActiveSheetView
sv.ColumnCount=7
sv.RowCount=1000
altrowstyle.BackColor=Color.LightCyan
altrowstyle.ForeColor=Color.Navy
altrowstyle.Font.Bold=True
altrowmodel.SetDirectAltRowInfo(1,altrowstyle)
sv.StyleModel=altrowmodel
sv.TopRow=4

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.