Worksheet settings can be changed by calling the SetSettings, EnableSettings, or DisableSettings methods on the worksheet instance:
var worksheet = reoGridControl.CurrentWorksheet;
// Set settings
worksheet.SetSettings(WorksheetSettings settings, bool enabled);
worksheet.EnableSettings(WorksheetSettings settings);
worksheet.DisableSettings(WorksheetSettings settings);
// Get settings
bool value = worksheet.HasSetting(WorksheetSettings settings);
Worksheet settings include the following items:
Behavior
| Setting | Desc |
|---|---|
| Behavior_DoubleClickToFitRowHeight | Allow double-clicking to fit row height |
| Behavior_DoubleClickToFitColumnWidth | Allow double-clicking to fit column width |
| Behavior_MouseWheelToScroll | Allow scrolling the worksheet with the mouse wheel |
| Behavior_MouseWheelToZoom | Allow zooming the worksheet with the mouse wheel |
| Behavior_ShortcutKeyToZoom | Allow zooming the worksheet with shortcut keys (Ctrl + plus/minus) |
| Behavior_DragToMoveCells | Allow moving or copying the selected range by dragging the mouse |
| Behavior_DragToMoveColumnHeader | Allow the user to move an entire column by dragging the mouse (Reserved) |
| Behavior_ScrollToFocusCell | Always scroll the worksheet to keep the focused cell visible |
| Behavior_AllowUserChangingPageBreaks | Allow the user to insert, remove, or adjust page breaks with the mouse |
Editing
| Setting | Desc |
|---|---|
| Edit_Readonly | Indicates that the worksheet is in read-only mode. No changes will be permitted |
| Edit_AutoFormatCell | Allow formatting data after text is edited or entered by the end-user |
| Edit_FriendlyPercentInput | Display a percent symbol when the user enters data in a percent-formatted cell |
| Edit_AutoAdjustRowHeight | Allow automatic row height adjustment when the user increases a cell’s font size |
| Edit_AllowAdjustRowHeight | Allow the user to adjust row height by dragging the mouse |
| Edit_AllowAdjustColumnWidth | Allow the user to adjust column width by dragging the mouse |
| Edit_DragSelectionToMoveCells | Allow the user to drag and drop the selection to move cell content |
| Edit_DragSelectionToFillSerial | Allow the user to fill ranges by dragging the mouse |
Appearance
| Setting | Desc |
|---|---|
| View_ShowColumnHeader | Show column headers |
| View_ShowRowHeader | Show row headers |
| View_ShowHorizontalRuler | Show ruler in the horizontal direction (Reserved) |
| View_ShowVerticalRuler | Show ruler in the vertical direction (Reserved) |
| View_ShowGuideLine | Show guide lines |
| View_ShowHiddenCellLine | Show a single line on the header of hidden rows |
| View_AllowShowRowOutlines | Show row outlines if outlines exist |
| View_AllowShowColumnOutlines | Show column outlines if outlines exist |
| View_ShowPageBreaks | Show page-break lines |
| View_AllowCellTextOverflow | Restrict cell text to display only within the cell, preventing it from overlapping neighboring cells |
| View_ShowPrintAreasEnable | Show boundary lines of print areas |
Formula Calculation
| Setting | Desc |
|---|---|
| Formula_AutoUpdateReferenceCell | Allow automatic updating of formula reference cells |
| Formula_AutoPickingAddress | Allow selecting and picking an address from the worksheet during formula editing |
| Formula_AutoFormat | Allow automatic correction, formatting, and rebuilding of formulas |