Spread Windows Forms 12.0 Product Documentation
SelectionPolicy Property (ISheetSelectionModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetSelectionModel Interface : SelectionPolicy Property
Gets or sets whether users can select ranges of items.
Syntax
'Declaration
 
Property SelectionPolicy As SelectionPolicy
'Usage
 
Dim instance As ISheetSelectionModel
Dim value As SelectionPolicy
 
instance.SelectionPolicy = value
 
value = instance.SelectionPolicy
SelectionPolicy SelectionPolicy {get; set;}

Property Value

SelectionPolicy setting that determines the extent of selections
Example
This example specifies what users can select.
FarPoint.Win.Spread.Model.ISheetSelectionModel sel;
sel = (FarPoint.Win.Spread.Model.ISheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
sel.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single;
sel.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Column;
MessageBox.Show("You are only able to select columns. Try to select a row or the whole sheet", "SelectionPolicy/Unit", MessageBoxButtons.OK);
Dim sel As FarPoint.Win.Spread.Model.ISheetSelectionModel
sel = FpSpread1.ActiveSheet.Models.Selection
sel.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single
sel.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Column
MessageBox.Show("You are only able to select columns. Try to select a row or the whole sheet", "SelectionPolicy/Unit", MessageBoxButtons.OK)
See Also

Reference

ISheetSelectionModel Interface
ISheetSelectionModel Members