ReoGrid provides settings for workbook WorkbookSettings and settings for every worksheet WorksheetSettings. By using settings, it is possible to change many default behavior for workbook and worksheet.

Workbook Settings

Settings of workbook can be changed by invoke SetSettings, EnableSettings, DisableSettings method of workbook instance:

// Set settings
reoGridControl.SetSettings(WorkbookSettings settings, bool enabled);
reoGridControl.EnableSettings(WorkbookSettings settings);
reoGridControl.DisableSetting(WorkbookSettings settings);

// Get settings
bool value = reoGridControl.HasSetting(WorkbookSettings settings);


View_ShowSheetTabControl Allow to show sheet tab control
View_ShowScrollsShow Allow to show all scroll bars
View_ShowHorScrollShow Allow to show horizontal scroll bar
View_ShowVerScrollShow Allow to show vertical scroll bar

Script Extension (only available in Extension Package)

Script_AutoRunOnload Determine whether or not to run script instantly after workbook or worksheet is loaded from resource
Script_PromptBeforeAutoRun Prompt message to end-user before run script from workbook if it is loaded from resource

Worksheet Settings

Settings of worksheet can be changed by invoke SetSettings, EnableSettings, DisableSettings method of worksheet instance:

var worksheet = reoGridControl.CurrentWorksheet;

// Set settings
worksheet.SetSettings(WorkbookSettings settings, bool enabled); 
worksheet.EnableSettings(WorkbookSettings settings);
worksheet.DisableSetting(WorkbookSettings settings);

// Get settings
bool value = reoGridControl.HasSetting(WorkbookSettings settings);

Settings of worksheet have the following items:


Setting Desc
Behavior_DoubleClickToFitRowHeight Allow double click to fit row height
Behavior_DoubleClickToFitColumnWidth Allow double click to fit column width
Behavior_MouseWheelToScroll Allow scroll worksheet by wheeling mouse
Behavior_MouseWheelToZoom Allow zoom worksheet by wheeling mouse
Behavior_ShortcutKeyToZoom Allow zoom worksheet by shortcut-keys (Ctrl + plus/minus)
Behavior_DragToMoveCells Allow move or copy selected range by dragging mouse
Behavior_DragToMoveColumnHeader Allow user to move entire column by dragging mouse (Reserved)
Behavior_ScrollToFocusCell Allow always by scrolling worksheet to keep focused cell visibile
Behavior_AllowUserChangingPageBreaks Allow user to insert, remove or adjust the page-breaks by mouse


Setting Desc
Edit_Readonly Indicates that worksheet works in read-only mode. Any changes will not be allowed
Edit_AutoFormatCell Allow format data after text edited or inputed by end-user
Edit_FriendlyPercentInput Allow to display a percent symbol when user inputting data inside percent-format cell
Edit_AutoAdjustRowHeight Allow adjusting the height of row when user enlarges font of cell
Edit_AllowAdjustRowHeight Allows user to adjust height of row by dragging mouse
Edit_AllowAdjustColumnWidth Allows user to adjust the width of column by dragging mouse
Edit_DragSelectionToMoveCells Allows user drags and drops the selection to move cell content
Edit_DragSelectionToFillSerial Allows user to fill ranges by dragging mouse


View_ShowPrintAreasEnable to show paging boundaries for printing areas (from v0.8.6)

Setting Desc
View_ShowColumnHeader Show column headers
View_ShowRowHeader Show row headers
View_ShowHorizontalRuler Show ruler in horizontal direction (Reserved)
View_ShowVerticalRuler Show ruler in vertical direction (Reserved)
View_ShowGuideLine Show guide lines
View_ShowHiddenCellLine Allow to show a single line on hidden rows header
View_AllowShowRowOutlines Allow to show row outlines if outlines exiting
View_AllowShowColumnOutlines Allow to show column outlines if outlines exiting
View_ShowPageBreaks Allow to show page-break lines
View_AllowCellTextOverflow Make cell’s text only displayed inside cell, don’t overlay over neighbor cells

Formula Calculation

Setting Desc
Formula_AutoUpdateReferenceCell Allow to update formula reference cells automatically
Formula_AutoPickingAddress Allow to select and pick an address from worksheet during formula edit Pro
Formula_AutoFormat Allow to correct, format and rebuild formula automatically Pro

See Also

Next: Control Appearance

7 Responses to “Settings”

  1. Polycarp says:

    How do I get to enable this setting Behavior_DragToMoveColumnHeader? It is not available among the worksheet settings.

    • Jing says:

      Behavior_DragToMoveColumnHeader is reserved feature and not implemented currently. This feature may available in future versions.

  2. Eric Miller says:

    Hi, I can’t find a method for getting the Worksheet settings, you have a method for Workbook settings. So how do I get the settings for the Worksheet?

    • Jing says:

      WorksheetSettings is provided for every worksheet instance. You have to get an instance of worksheet before using settings:

      var worksheet = reoGridControl.CurrentWorksheet;

  3. Dominik Scholz says:

    Hello. My worksheet has scrollbars, and when I change the Edit_Readonly from true to false and again to true, they disappear. Setting the Workbook propperty View_ShowScrolls or ViewShowVerScroll seems to have no effect on the scrollbars when in readonly mode.
    How can I get the scrollbars to show up again, after setting the worksheet to ReadOnly mode?

  4. Alejandro Souza says:

    I wonder if is possible to change any setting to :
    When users use the mouse to select the rows in the grid by clicking on the row number and dragging down, cause the grid to scroll down when the mouse pointer enters the horizontal scroll bar area or out of the grid area