Spread for ASP.NET 9.0 Product Documentation
OperationMode Enumeration
Example Example 


Specifies how the sheet responds to user interaction and how selection behaves.
Syntax
'Declaration
 
Public Enum OperationMode 
   Inherits System.Enum
'Usage
 
Dim instance As OperationMode
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.
FarPoint.Web.Spread.SheetView sv=FpSpread1.ActiveSheetView;
int i,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);
}
Dim sv As FarPoint.Web.Spread.SheetView
Dim i,j As Integer
sv=FpSpread1.ActiveSheetView
sv.ColumnCount=6
sv.PageSize=20
sv.RowCount=20
sv.OperationMode=FarPoint.Web.Spread.OperationMode.SingleSelect
For i=0 To 19
For j=0 To 5
sv.SetValue(i,j,100+i)
Next j
Next i
Inheritance Hierarchy

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

Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FarPoint.Web.Spread Namespace
OperationMode Property

User-Task Documentation

Specifying What the User Can Select

 

 


Copyright © GrapeCity, inc. All rights reserved.