Spread for ASP.NET 11 Product Documentation
SetColumnMerge Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : SetColumnMerge Method
Column index
MergePolicy enumeration setting
Sets whether or how cells in a column on this sheet that have the same content are joined in a single cell across multiple rows.
Syntax
'Declaration
 
Public Sub SetColumnMerge( _
   ByVal column As Integer, _
   ByVal value As MergePolicy _
) 
'Usage
 
Dim instance As SheetView
Dim column As Integer
Dim value As MergePolicy
 
instance.SetColumnMerge(column, value)
public void SetColumnMerge( 
   int column,
   MergePolicy value
)

Parameters

column
Column index
value
MergePolicy enumeration setting
Remarks
The MergePolicy setting specifies if and how cells in this column are automatically merged.
Example
This example sets all cells in a column that contain the same data to automatically merge.
FpSpread1.ActiveSheetView.Cells[0, 2, 2, 2].Text = "Test";
FpSpread1.ActiveSheetView.SetColumnMerge(2, FarPoint.Web.Spread.Model.MergePolicy.Always);
FpSpread1.ActiveSheetView.Cells(0, 2, 2, 2).Text = "Test"
FpSpread1.ActiveSheetView.SetColumnMerge(2, FarPoint.Web.Spread.Model.MergePolicy.Always)
See Also

Reference

SheetView Class
SheetView Members
GetColumnMerge Method
SetRowMerge Method

User-Task Documentation

Merging Cells Automatically