Spread for ASP.NET 10 Product Documentation
RemoveSpanCell Method
Example 


Row index
Column index
Removes the span from a range of cells that contain a specified anchor cell.
Syntax
'Declaration
 
Public Sub RemoveSpanCell( _
   ByVal row As Integer, _
   ByVal column As Integer _
) 
'Usage
 
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
 
instance.RemoveSpanCell(row, column)
public void RemoveSpanCell( 
   int row,
   int column
)

Parameters

row
Row index
column
Column index
Remarks

You can remove a span range by calling this method, specifying the anchor cell of the span range to remove the range.

When you remove a span range, the data that was previously in each of the cells in the span is re-displayed in the cell. The data was never removed from the cell, but simply hidden by the span range. Also, the cell types of the cells combined in the span are not changed.

Create a span of cells by calling the AddSpanCell method. Return whether a cell is in a span range, and the size of the range if it is in one, by calling the GetSpanCell method.

Example
This example removes the span from the range of cells that contain the specified anchor cell.
private void PageLoad(object sender, System.EventArgs e)
{
      FarPoint.Web.Spread.SheetView sv;
      sv = FpSpread1.ActiveSheetView;
      sv.AddSpanCell(1, 1, 2, 3);
}

private void Button1Click(object sender, System.EventArgs e)
{
      FarPoint.Web.Spread.SheetView sv;
      sv = FpSpread1.ActiveSheetView;
      sv.Cells[1, 0].Value = 100;
      sv.RemoveSpanCell(1, 1);
}
Private Sub PageLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Dim sv As FarPoint.Web.Spread.SheetView
      sv = FpSpread1.ActiveSheetView
      sv.AddSpanCell(1, 1, 2, 3)
End Sub

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      Dim sv As FarPoint.Web.Spread.SheetView
      sv = FpSpread1.ActiveSheetView
      sv.Cells(1, 0).Value = 100
      sv.RemoveSpanCell(1, 1)
End Sub
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
GetSpanCell Method

User-Task Documentation

Spanning Cells

 

 


Copyright © GrapeCity, inc. All rights reserved.