Spread Windows Forms 12.0 Product Documentation
RemoveSelection Method (SheetView)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : RemoveSelection Method
Starting row index of selection to remove
Starting column index of selection to remove
Number of rows in selection to remove
Number of columns in selection to remove
Removes the specified selection from this sheet.
Syntax
'Declaration
 
Public Sub RemoveSelection( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) 
'Usage
 
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
 
instance.RemoveSelection(row, column, rowCount, columnCount)
public void RemoveSelection( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

Parameters

row
Starting row index of selection to remove
column
Starting column index of selection to remove
rowCount
Number of rows in selection to remove
columnCount
Number of columns in selection to remove
Example
This example removes a selection and a span cell from the sheet.
DialogResult dlg;
fpSpread1.ActiveSheet.AddSpanCell(0, 0, 2, 2);
fpSpread1.ActiveSheet.AddSelection(2, 0, 2, 2);
dlg = MessageBox.Show("Do you want to remove the selection and span cell?", "RemoveSelection/SpanCell", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    fpSpread1.ActiveSheet.RemoveSelection(2, 0, 2, 2);
    fpSpread1.ActiveSheet.RemoveSpanCell(0, 0);
}
Dim dlg As DialogResult
FpSpread1.ActiveSheet.AddSpanCell(0, 0, 2, 2)
FpSpread1.ActiveSheet.AddSelection(2, 0, 2, 2)
dlg = MessageBox.Show("Do you want to remove the selection and span cell?", "RemoveSelection/SpanCell", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.RemoveSelection(2, 0, 2, 2)
    FpSpread1.ActiveSheet.RemoveSpanCell(0, 0)
End If
See Also

Reference

SheetView Class
SheetView Members
AddSelection Method
ClearSelection Method

User-Task Documentation

Working with Selections