Spread ASP.NET 6.0 Product Documentation
ActiveRow Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : ActiveRow Property


Glossary Item Box

Gets or sets the active row.

Syntax

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

Property Value

Integer index of the currently selected row

Remarks

This property is available at run time only.

Set this property to specify the active row. Return the value of this property to retrieve the row index of the active row.

When the active row changes, the ActiveRowChanged event occurs.

This property is saved in the view state.

Example

This example creates a SheetView object and assigns it to the active sheet. The ActiveColumn and ActiveRow properties are set and a value is placed in the active cell. The AllowInsert and AllowDelete properties are set to true so that when the user clicks the Insert button on the command bar a row is inserted, when the user clicks the Add button a row is added at the bottom, and when the user clicks the Delete button the selected row is deleted.
C#Copy Code
    FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView;
    sv.ActiveColumn = 2;
    sv.ActiveRow = 2;
    sv.SetValue(sv.ActiveColumn, sv.ActiveRow, "Active");
    sv.OperationMode = FarPoint.Web.Spread.OperationMode.Normal;
    sv.AllowInsert = True;
    sv.AllowDelete = True;
Visual BasicCopy Code
    Dim sv As FarPoint.Web.Spread.SheetView
    sv = FpSpread1.ActiveSheetView
    sv.ActiveColumn = 2
    sv.ActiveRow = 2
    sv.SetValue(sv.ActiveColumn, sv.ActiveRow, "Active")
    sv.OperationMode = FarPoint.Web.Spread.OperationMode.Normal
    sv.AllowInsert = True
    sv.AllowDelete = True

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.