Spread ASP.NET 6.0 Product Documentation
OperationMode Enumeration
Example  See Also  Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace : OperationMode Enumeration


Glossary Item Box

Specifies how the sheet responds to user interaction and how selection behaves.

Syntax

Visual Basic (Declaration) 
Public Enum OperationMode 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As OperationMode
C# 
public enum OperationMode : System.Enum 

Members

MemberDescription
ExtendedSelectAllows the user to select multiple discontiguous rows in the spreadsheet (as one would in an extended-select list box)
MultiSelectAllows the user to select multiple contiguous rows in the spreadsheet (as one would in a multiple-select list box)
NormalAllows users to perform default spreadsheet selecting and editing
ReadOnlyAllows users to see the data but not to select or edit any cell or row in the sheet
RowModeAllows users to select (highlight) a single row only and to edit an individual cell in that row
SingleSelectAllows users to select (highlight) a single row only but not to edit any cell

Remarks

Use these settings to set how much the user can interact with the sheet by controlling the ability to select a row and to edit a cell.

In Normal mode, the default sheet operations are available. The user can select a row or column by clicking on the corresponding header cell. The user can select the entire sheet by clicking on the sheet corner. The user can select a range of cells by dragging over those cells. For a row or column or range, the first (upper left) cell is the active cell until the user clicks on another cell in that row or column or range. The user can click on an individual cell in the data area without selecting an entire row. Client-side scripting is not turned off.

In RowMode mode, the user can select a row in the sheet and can edit any individual cell in that row by double-clicking the cell. The selected (active) row is highlighted. When the user begins typing data in the active cell the row remains highlighted. The user can click another cell to make that the active cell. Once the user clicks on a cell in a different row, the highlighting moves to that row. Client-side scripting is not turned off. The scroll bars and paging appear as normal.

In SingleSelect mode, the user can only select a row, but still cannot edit any of the cells. The spreadsheet operates like a list box in that the user can select a single row in the sheet, similar to a single-selection list box. The selected row is highlighted. There is no active cell, since cells cannot be edited. Client-side scripting is not turned off. The scroll bars and paging appear as normal.

In ReadOnly mode, the user cannot select any rows for highlighting nor edit any cells. In fact, the client-side scripting is turned off, so that the scroll bars, if any, are not displayed. The user can page through the data, but not edit any of it. The sheet is said to be "read-only" and there is no active cell. Since there are no scroll bars, the entire row count and column count are displayed.

Example

This example creates a spreadsheet with 6 columns and 20 rows and single-cell-select functionality. With this setting, all the columns and rows are visible and the user can select a single row, but cannot edit the values in the cells.
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
inti,j;
sv.ColumnCount=6;
sv.PageSize=20;
sv.RowCount=20;
sv.OperationMode=FarPoint.Web.Spread.OperationMode.SingleSelect;
for(i=0;i<=19;i++)
{
for(j=0;j<=5;j++)
sv.SetValue(i,j,100+i);
}
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
Dimi,jAsInteger
sv=FpSpread1.ActiveSheetView
sv.ColumnCount=6
sv.PageSize=20
sv.RowCount=20
sv.OperationMode=FarPoint.Web.Spread.OperationMode.SingleSelect
Fori=0To19
Forj=0To5
sv.SetValue(i,j,100+i)
Nextj
Nexti

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.OperationMode

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.