Spread Windows Forms 11.0 Product Documentation
GetMergeCell Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : GetMergeCell Method
The row index of the cell
The column index of the cell
Returns the merged cell range for the specified cell.
Syntax
'Declaration
 
Public Function GetMergeCell( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As CellRange
'Usage
 
Dim instance As SpreadView
Dim row As Integer
Dim column As Integer
Dim value As CellRange
 
value = instance.GetMergeCell(row, column)
public CellRange GetMergeCell( 
   int row,
   int column
)

Parameters

row
The row index of the cell
column
The column index of the cell

Return Value

A CellRange object
Example
This example uses the GetMergeCell 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.GetMergeCell(0,0).ColumnCount);
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.GetMergeCell(0, 0).ColumnCount)
See Also

Reference

SpreadView Class
SpreadView Members