Spread WPF 15
GrapeCity.Windows.SpreadSheet.Data Namespace / Worksheet Class / AddSpanCell Method / AddSpanCell(Int32,Int32,Int32,Int32) Method
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.

In This Topic
    AddSpanCell(Int32,Int32,Int32,Int32) Method
    In This Topic
    Adds a span of cells in this sheet in the specified sheet area.
    Public Overloads Sub AddSpanCell( _
       ByVal row As Integer, _
       ByVal column As Integer, _
       ByVal rowCount As Integer, _
       ByVal columnCount As Integer _
    Dim instance As Worksheet
    Dim row As Integer
    Dim column As Integer
    Dim rowCount As Integer
    Dim columnCount As Integer
    instance.AddSpanCell(row, column, rowCount, columnCount)
    public void AddSpanCell( 
       int row,
       int column,
       int rowCount,
       int columnCount


    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.
    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);
    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)
    See Also