ReoGrid provides settings for the workbook (WorkbookSettings) and for each individual worksheet (WorksheetSettings). Using these settings, you can change many default behaviors for the workbook and worksheets.
Workbook Settings
Workbook settings can be changed by calling the SetSettings, EnableSettings, or DisableSettings methods on the workbook instance:
// Set settings
reoGridControl.SetSettings(WorkbookSettings settings, bool enabled);
reoGridControl.EnableSettings(WorkbookSettings settings);
reoGridControl.DisableSettings(WorkbookSettings settings);
// Get settings
bool value = reoGridControl.HasSettings(WorkbookSettings settings);
Appearance
| Setting | Description |
|---|
| View_ShowSheetTabControl | Allow showing the sheet tab control |
| View_ShowScrolls | Allow showing all scroll bars |
| View_ShowHorScroll | Allow showing the horizontal scroll bar |
| View_ShowVerScroll | Allow showing the vertical scroll bar |
Worksheet Settings
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.HasSettings(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_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_AutoExpandRowHeight | 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_ShowGridLine | 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 | Allow cell text to overflow into neighboring empty cells |
| Setting | Desc |
|---|
| Formula_AutoUpdateReferenceCell | Allow automatic updating of formula reference cells |
| Formula_AutoPickingCellAddress | Reserved |
| Formula_AutoFormat | Allow automatic correction, formatting, and rebuilding of formulas |