Spread for ASP.NET 11 Product Documentation
AddRow(Int32) Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class > AddRow Method : AddRow(Int32) Method
Row index at which to add a new row
Adds a row to the data model at the specified position.
Syntax
'Declaration
 
Public Overloads Sub AddRow( _
   ByVal row As Integer _
) 
'Usage
 
Dim instance As DefaultSheetDataModel
Dim row As Integer
 
instance.AddRow(row)
public void AddRow( 
   int row
)

Parameters

row
Row index at which to add a new row
Example
This example adds two new rows to the model in the click event of a button
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(2);        
}
Private Sub Button1_Click(ByVal sender As System.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(2)
End Sub
See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members
Overload List