Spread for ASP.NET 10 Product Documentation
Clear(Int32,Int32,Int32,Int32) Method
Example 


Row index from which to start clearing cell spans
Column index from which to start clearing cell spans
Number of rows to clear
Number of columns to clear
Removes cell spans from the collection within the specified area.
Syntax
'Declaration
 
Public Overloads Overridable Sub Clear( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) 
'Usage
 
Dim instance As DefaultSheetSpanModel
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
 
instance.Clear(row, column, rowCount, columnCount)
public virtual void Clear( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

Parameters

row
Row index from which to start clearing cell spans
column
Column index from which to start clearing cell spans
rowCount
Number of rows to clear
columnCount
Number of columns to clear
Example
This example adds a span to the ColumnHeaderSpanModel of the active sheet and returns the values of its methods to a list box. In the click event of a button, the span is cleared.
PrivatevoidPage_Load(objectsender,System.EventArgse)
{
If(this.IsPostBack)Return;

boolb1;
FarPoint.Web.Spread.Model.CellRangerange;
FpSpread1.ActiveSheetView.ColumnCount=10;
FpSpread1.ActiveSheetView.RowCount=10;
FpSpread1.ActiveSheetView.ColumnHeader.RowCount=3;
FarPoint.Web.Spread.Model.ISheetSpanModelmodel=FpSpread1.ActiveSheetView.ColumnHeaderSpanModel;
model.Add(0,0,3,3);
range=model.Find(2,2);
b1=model.IsEmpty();
ListBox1.Items.Add(range.ToString());
ListBox1.Items.Add(Convert.ToString(model.GetEnumerator(0,0,3,3)));
ListBox1.Items.Add(Convert.ToString(b1));
}

PrivatevoidButton1_Click(objectsender,System.EventArgse)
{
FarPoint.Web.Spread.Model.DefaultSheetSpanModelmodel=(FarPoint.Web.Spread.Model.DefaultSheetSpanModel)FpSpread1.ActiveSheetView.ColumnHeaderSpanModel;
model.Clear(0,0,3,3);
}
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

If(IsPostBack)ThenReturn

DimrangeAsFarPoint.Web.Spread.Model.CellRange
Dimb1AsBoolean
FpSpread1.ActiveSheetView.ColumnCount=10
FpSpread1.ActiveSheetView.RowCount=10
FpSpread1.ActiveSheetView.ColumnHeader.RowCount=3
DimmodelAsFarPoint.Web.Spread.Model.ISheetSpanModel=FpSpread1.ActiveSheetView.ColumnHeaderSpanModel
model.Add(0,0,3,3)
range=model.Find(2,2)
b1=model.IsEmpty()
ListBox1.Items.Add(range.ToString)
ListBox1.Items.Add(Convert.ToString(model.GetEnumerator(0,0,3,3)))
ListBox1.Items.Add(b1)
EndSub

PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click
DimmodelAsFarPoint.Web.Spread.Model.DefaultSheetSpanModel=FpSpread1.ActiveSheetView.ColumnHeaderSpanModel
model.Clear(0,0,3,3)
EndSub
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

DefaultSheetSpanModel Class
DefaultSheetSpanModel Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.