Spread for ASP.NET 7.0 Product Documentation
AddRow() Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class > AddRow Method : AddRow() Method


Glossary Item Box

Adds a row to the data model after the last row.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub AddRow() 
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
 
instance.AddRow()
C# 
public void AddRow()

Example

This example adds a new row to the model in the click event of a button
C#Copy Code
Private void Button1_Click(object sender, System.EventArgs e)
{
  FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
  dm.AddRow();        
}
Visual BasicCopy Code
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel = CType(FpSpread1.ActiveSheetView.DataModel, FarPoint.Web.Spread.Model.DefaultSheetDataModel)
  dm.AddRow()
End Sub

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.