ComponentOne True DBGrid for WinForms
Run-Time Interaction / Navigation and Scrolling / Clicking the Rightmost Column
In This Topic
    Clicking the Rightmost Column
    In This Topic

    The grid always displays the leftmost column (the first visible column) in its entirety. The rightmost column, however, is usually clipped. The behavior of the last partially visible column when clicked by the user is controlled by the grid's ExposeCellMode property.

    The default value for the ExposeCellMode property is ExposeCellModeEnum.ScrollOnSelect. If the user clicks the rightmost column when it is partially visible, the grid will scroll to the left to display this column in its entirety. This may be less desirable for users who commonly click on the grid to begin editing, as the grid will always shift to the left when the user clicks on a partially visible rightmost column.

    If ExposeCellMode is set to ExposeCellModeEnum.ScrollOnEdit, the grid will not scroll when the rightmost visible column is clicked. However, if the user attempts to edit the cell, then the grid will scroll to the left to display the column in its entirety. This is how Microsoft Excel works and is probably the most familiar setting to users.

    If ExposeCellMode is set to ExposeCellModeEnum.ScrollNever, the grid will not scroll to make the rightmost column visible, even if the user subsequently attempts to edit the cell. Note that editing may be difficult if only a small portion of the column is visible. The chief reason to use this setting is to ensure enough space is available for editing (or if editing is disallowed) and to prevent the grid from shifting accidentally.

    Note that the ExposeCellMode property controls the behavior of the rightmost visible column only when the user clicks it with the mouse. If the rightmost column becomes visible by code (setting the grid's Col property) or by keyboard navigation, then the grid will always scroll to make it totally visible.

    See Also