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


row
Row index at which to add row
autoFillData
Whether to automatically fill the row with data

Glossary Item Box

Adds the unbound row to the data source.

Syntax

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

Parameters

row
Row index at which to add row
autoFillData
Whether to automatically fill the row with data

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 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.