Spread Windows Forms 12.0 Product Documentation
GetMergeCells Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : GetMergeCells Method
Returns all merged cell ranges for the view.
Syntax
'Declaration
 
Public Function GetMergeCells() As ArrayList
'Usage
 
Dim instance As SpreadView
Dim value As ArrayList
 
value = instance.GetMergeCells()
public ArrayList GetMergeCells()

Return Value

An array list of CellRange objects
Example
This example uses the GetMergeCells method.
fpSpread1.Sheets[0].SetRowMerge(-1, FarPoint.Win.Spread.Model.MergePolicy.Always);
fpSpread1.Sheets[0].SetColumnMerge(-1, FarPoint.Win.Spread.Model.MergePolicy.Always);
fpSpread1.Sheets[0].Cells[0, 0].Text = "Test";
fpSpread1.Sheets[0].Cells[1, 0].Text = "Test";
fpSpread1.Sheets[0].Cells[0, 1].Text = "Test";
fpSpread1.Sheets[0].Cells[1, 1].Text = "Test";

FarPoint.Win.Spread.SpreadView sv;
sv = fpSpread1.GetRootWorkbook();
listBox1.Items.Add(sv.GetMergeCells().Count);
fpSpread1.Sheets(0).SetRowMerge(-1, FarPoint.Win.Spread.Model.MergePolicy.Always)
fpSpread1.Sheets(0).SetColumnMerge(-1, FarPoint.Win.Spread.Model.MergePolicy.Always)
fpSpread1.Sheets(0).Cells(0, 0).Text = "Test"
fpSpread1.Sheets(0).Cells(1, 0).Text = "Test"
fpSpread1.Sheets(0).Cells(0, 1).Text = "Test"
fpSpread1.Sheets(0).Cells(1, 1).Text = "Test"

Dim sv As FarPoint.Win.Spread.SpreadView
sv = fpSpread1.GetRootWorkbook()
ListBox1.Items.Add(sv.GetMergeCells().Count)
See Also

Reference

SpreadView Class
SpreadView Members