Spread Windows Forms 9.0 Product Documentation
ClearSelection Method (SheetView)
Example 


Removes all selections from this sheet.
Syntax
'Declaration
 
Public Sub ClearSelection() 
'Usage
 
Dim instance As SheetView
 
instance.ClearSelection()
public void ClearSelection()
Example
This example removes all selections from the active sheet.
FarPoint.Win.Spread.SheetView sv = new FarPoint.Win.Spread.SheetView();
DialogResult dlg;
sv.AddSelection(0, 0, 2, 2);
sv.AddSelection(4,0,6,2);
fpSpread1.Sheets.Add(sv);
fpSpread1.ActiveSheet = sv;
dlg = MessageBox.Show("Do you want to clear the selections?", "ClearSelection", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
    sv.ClearSelection();
}
Dim sv As New FarPoint.Win.Spread.SheetView()
Dim dlg As DialogResult
sv.AddSelection(0, 0, 2, 2)
sv.AddSelection(4, 0, 6, 2)
FpSpread1.Sheets.Add(sv)
FpSpread1.ActiveSheet = sv
dlg = MessageBox.Show("Do you want to clear the selections?", "ClearSelection", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    sv.ClearSelection()
End If
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView Class
SheetView Members
AddSelection Method
RemoveSelection Method

User-Task Documentation

Working with Selections

 

 


Copyright © GrapeCity, inc. All rights reserved.