Spread Windows Forms 6.0 Product Documentation
ClearSelection Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : ClearSelection Method


Glossary Item Box

Removes all selections from this sheet.

Syntax

Visual Basic (Declaration) 
Public Sub ClearSelection() 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
 
instance.ClearSelection()
C# 
public void ClearSelection()

Example

This example removes all selections from the active sheet.
C#Copy Code
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();
}
Visual BasicCopy Code
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.