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


row
Row index at which to start adding rows
count
Number of rows to add

Glossary Item Box

Adds unbound rows to the data model.

Syntax

Visual Basic (Declaration) 
Public Sub AddUnboundRows( _
   ByVal row As Integer, _
   ByVal count As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim row As Integer
Dim count As Integer
 
instance.AddUnboundRows(row, count)
C# 
public void AddUnboundRows( 
   int row,
   int count
)

Parameters

row
Row index at which to start adding rows
count
Number of rows to add

Remarks

This creates a row of blank cells that is not bound to the data set and does not affect the data set. An unbound row does not inherently appear or behave differently from bound rows.

The unbound row is added to the models using the IUnboundRowSupport interface.

If you subsequently need to add an unbound row to the bound data set, use AddRowToDataSource method.

For more information, refer to Adding an Unbound Row.

Example

This example adds a row to the data source.
C#Copy Code
private void FpSpread1ChildViewCreated(object sender, FarPoint.Web.Spread.CreateChildViewEventArgs e)
{
      FarPoint.Web.Spread.SheetView sv;
      sv = e.SheetView;
      sv.AddUnboundRows(0, 1);
      sv.Cells[0, 0].Value = "Dallas";
      sv.Cells[0, 1].Value = "0";
      sv.Cells[0, 2].Value = "Texas";
      sv.AddRowToDataSource(0, true);
}
Visual BasicCopy Code
Private Sub FpSpread1ChildViewCreated(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.CreateChildViewEventArgs) Handles
FpSpread1.ChildViewCreated
      Dim sv As FarPoint.Web.Spread.SheetView
      sv = e.SheetView
      sv.AddUnboundRows(0, 1)
      sv.Cells(0, 0).Value = "Dallas"
      sv.Cells(0, 1).Value = "0"
      sv.Cells(0, 2).Value = "Texas"
      sv.AddRowToDataSource(0, True)
End Sub

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.