Spread for ASP.NET 8.0 Product Documentation
Find Method (DefaultSheetSpanModel)
Example 


Row index of the cell
Column index of the cell
Finds the cell span in the collection that includes the cell at specified row and column.
Syntax
'Declaration
 
Public Overrides Function Find( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As CellRange
'Usage
 
Dim instance As DefaultSheetSpanModel
Dim row As Integer
Dim column As Integer
Dim value As CellRange
 
value = instance.Find(row, column)
public override CellRange Find( 
   int row,
   int column
)

Parameters

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

Return Value

CellRange object containing the cell range that contains the specified cell
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.ISheetSpanModelmodel=FpSpread1.ActiveSheetView.ColumnHeaderSpanModel;
model.Clear();
}
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.ISheetSpanModel=FpSpread1.ActiveSheetView.ColumnHeaderSpanModel
model.Clear()
EndSub
Requirements

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

See Also

Reference

DefaultSheetSpanModel Class
DefaultSheetSpanModel Members
GetEnumerator Method

 

 


Copyright © GrapeCity, inc. All rights reserved.