Spread Silverlight Documentation
AddSpanCell(Int32,Int32,Int32,Int32,SheetArea) Method
Example 


The row index of the cell at which to start the span.
The column index of the cell at which to start the span.
The number of rows to span.
The number of columns to span.
The sheet area.
Adds a span of cells in this sheet in the specified sheet area.
Syntax
'Declaration
 
Public Overloads Sub AddSpanCell( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal rowCount As System.Integer, _
   ByVal columnCount As System.Integer, _
   ByVal sheetArea As SheetArea _
) 
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim rowCount As System.Integer
Dim columnCount As System.Integer
Dim sheetArea As SheetArea
 
instance.AddSpanCell(row, column, rowCount, columnCount, sheetArea)
public void AddSpanCell( 
   System.int row,
   System.int column,
   System.int rowCount,
   System.int columnCount,
   SheetArea sheetArea
)

Parameters

row
The row index of the cell at which to start the span.
column
The column index of the cell at which to start the span.
rowCount
The number of rows to span.
columnCount
The number of columns to span.
sheetArea
The sheet area.
Example
This example uses the AddSpanCell method.
GrapeCity.Windows.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 3, 3);
gcSpreadSheet1.Sheets[0].AddSpanCell(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells);
//gcSpreadSheet1.Sheets[0].AddSpanCell(1, 1, 3, 3);
//gcSpreadSheet1.Sheets[0].AddSpanCell(4, 0, 2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells);

gcSpreadSheet1.Sheets[0].RowHeader.ColumnCount = 2;
gcSpreadSheet1.Sheets[0].ColumnHeader.RowCount = 2;
GrapeCity.Windows.SpreadSheet.Data.CellRange r2;
r2 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 2, 2);
gcSpreadSheet1.Sheets[0].AddSpanCell(r2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader);
gcSpreadSheet1.Invalidate();
Dim r As GrapeCity.Windows.SpreadSheet.Data.CellRange
r = New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 3, 3)
GcSpreadSheet1.Sheets(0).AddSpanCell(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells)
' GcSpreadSheet1.Sheets(0).AddSpanCell(1, 1, 3, 3)
' GcSpreadSheet1.Sheets(0).AddSpanCell(4, 0, 2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells)
GcSpreadSheet1.Sheets(0).RowHeader.ColumnCount = 2
GcSpreadSheet1.Sheets(0).ColumnHeader.RowCount = 2
Dim r2 As GrapeCity.Windows.SpreadSheet.Data.CellRange
r2 = New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 2, 2)
GcSpreadSheet1.Sheets(0).AddSpanCell(r2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader)
GcSpreadSheet1.Invalidate()
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.