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


Glossary Item Box

Gets or sets the mode that determines mouse, keyboard, and selection behavior for this sheet.

Syntax

Visual Basic (Declaration) 
Public Property OperationMode As OperationMode
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As OperationMode
 
instance.OperationMode = value
 
value = instance.OperationMode
C# 
public OperationMode OperationMode {get; set;}

Property Value

OperationMode setting that determines the mode

Exceptions

ExceptionDescription
System.ComponentModel.InvalidEnumArgumentException Specified operation mode is not valid

Remarks

When this property is set to OperationMode.Normal,

  • You can set the FpSpread class or SpreadView class SelectionBlockOptions property to specify that users can select only certain items, such as just cells, columns, or rows.
  • If you want to customize the sheet so that users and the application can only select certain items, set the SelectionUnit property.
  • If you want to allow users to select single cells, a range of cells, or multiple ranges of cells, set the SelectionPolicy property.

When this property is set to OperationMode.ReadOnly, if you want to customize the sheet so that users and the application can only select certain items, set the SelectionUnit property.

When this property is set, related properties are also set automatically as summarized in this table:

OperationMode
Setting

Effect on Other Properties
Normal SelectionPolicy = SelectionPolicy.Range
SelectionUnit = SelectionUnit.Cell
ReadOnly SelectionPolicy = SelectionPolicy.Range
SelectionUnit = SelectionUnit.Cell
RowMode SelectionPolicy = SelectionPolicy.Range
SelectionUnit = SelectionUnit.Cell
SingleSelect SelectionPolicy = SelectionPolicy.Single
SelectionUnit = SelectionUnit.Row
MultiSelect SelectionPolicy = SelectionPolicy.MultiRange
SelectionUnit = SelectionUnit.Row
ExtendedSelect SelectionPolicy = SelectionPolicy.MultiRange
SelectionUnit = SelectionUnit.Row

 

For information on the settings of OperationMode, refer to the OperationMode enumeration.

Example

This example sets the operation mode for the active sheet.
C#Copy Code
fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode;
Visual BasicCopy Code
FpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode

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.