Spread for ASP.NET 10 Product Documentation
GetSpanCell Method
Example 


Row index of the cell
Column index of the cell
Gets the span of cells at a specified cell.
Syntax
'Declaration
 
Public Overridable Function GetSpanCell( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As CellRange
'Usage
 
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim value As CellRange
 
value = instance.GetSpanCell(row, column)
public virtual CellRange GetSpanCell( 
   int row,
   int column
)

Parameters

row
Row index of the cell
column
Column index of the cell

Return Value

CellRange object containing the range of cells included in the span with the specified cell
Remarks

Creating a span of cells creates one large cell where there had previously been several. For example, if you create a span of cells from cell A1 to cell C2, cell A1 then appears to occupy the space from cell A1 through cell C2.

When you create a span of cells, the data in the first cell in the span (designated by the row and column parameters) occupies all the space in the span. When you create a span, the data that was in each of the cells in the span is still in each cell, but not displayed. The data is simply hidden by the span range. Also, the cell types of the cells combined in the span are not changed.

You can add a span of cells by calling the AddSpanCell method. You can remove a span from a range of cells by calling the RemoveSpanCell method.

Note:You cannot sort a sheet that has spanned cells.

Example
This example returns the range of cells in the span.
FarPoint.Web.Spread.SheetView sv;
FarPoint.Web.Spread.Model.CellRange cr;
sv = FpSpread1.ActiveSheetView;
cr = sv.GetSpanCell(0, 0)
Response.Write("The span contains cells " + cr.Row + "," + cr.Column + "," + cr.RowCount + "," + cr.ColumnCount);
Dim sv As FarPoint.Web.Spread.SheetView
Dim cr As FarPoint.Web.Spread.Model.CellRange
sv = FpSpread1.ActiveSheetView
cr = sv.GetSpanCell(0, 0)
Response.Write("The span contains cells " & cr.Row & "," & cr.Column & "," & cr.RowCount & "," & cr.ColumnCount)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

SheetView Class
SheetView Members
AddSpanCell Method
RemoveSpanCell method

User-Task Documentation

Spanning Cells

 

 


Copyright © GrapeCity, inc. All rights reserved.