Skip to main content
A newer version of this page is available. .
Tab

ASPxGridSettings.HorizontalScrollBarMode Property

Gets or sets a value specifying the horizontal scrollbar’s display mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue(ScrollBarMode.Hidden)]
public ScrollBarMode HorizontalScrollBarMode { get; set; }

Property Value

Type Default Description
ScrollBarMode **Hidden**

One of the ScrollBarMode enumeration values.

Available values:

Name Description
Hidden

The scrollbar is hidden.

Visible

The scrollbar is visible.

Auto

The scrollbar is automatically shown when the size of the control content exceeds the size of the control itself.

Property Paths

You can access this nested property as listed below:

Show 16 property paths
Library Object Type Path to HorizontalScrollBarMode
ASP.NET Controls and MVC Extensions ASPxCardView
.Settings.HorizontalScrollBarMode
ASPxGridView
.Settings.HorizontalScrollBarMode
ASPxVerticalGrid
.Settings.HorizontalScrollBarMode
GridViewProperties
.Settings.HorizontalScrollBarMode
CardViewSettings
.Settings.HorizontalScrollBarMode
CardViewSettings<CardType>
.Settings.HorizontalScrollBarMode
GridViewSettings
.Settings.HorizontalScrollBarMode
GridViewSettings<RowType>
.Settings.HorizontalScrollBarMode
MVCxCardView
.Settings.HorizontalScrollBarMode
MVCxGridView
.Settings.HorizontalScrollBarMode
MVCxGridViewProperties
.Settings.HorizontalScrollBarMode
MVCxVerticalGrid
.Settings.HorizontalScrollBarMode
VerticalGridSettings
.Settings.HorizontalScrollBarMode
VerticalGridSettings<ColumnType>
.Settings.HorizontalScrollBarMode
ASP.NET Bootstrap Controls BootstrapCardView
.Settings.HorizontalScrollBarMode
BootstrapGridView
.Settings.HorizontalScrollBarMode

Remarks

Use the HorizontalScrollBarMode property to control the visibility of the horizontal scroll bar in the control.

The vertical scrollbar display mode can be specified by the ASPxGridSettings.VerticalScrollBarMode property.

Note

  • You should specify the grid’s and its columns’ widths () if the grid displays the horizontal scroll bar.
  • You cannot change the HorizontalScrollBarMode and ASPxGridSettings.VerticalScrollBarMode properties values on callback.
  • When the grid uses the horizontal scrollbar, end-users cannot switch pages using swipe gestures (the ASPxGridBase.EnablePagingGestures property is not in effect).

When the horizontal scrolling is enabled, you can use the FixedStyle property to fix columns to the left edge.

<dx:ASPxGridView ID="Grid" >
    <Columns>
        <dx:GridViewDataColumn FieldName="ContactName" Width="150" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="CompanyName" Width="180" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="City" Width="130" />
        ...
    </Columns>
    <Settings HorizontalScrollBarMode="Visible" />
    <Styles>
        <FixedColumn BackColor="LightYellow" />
    </Styles>
</dx:ASPxGridView>

Example

Declaratively:

<dx:ASPxGridView ID="Grid" >
    <Columns>
        ...
    </Columns>
    <Settings HorizontalScrollBarMode="Visible" VerticalScrollBarMode="Visible" />
</dx:ASPxGridView>

In code:

ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
grid1.Settings.HorizontalScrollBarMode = ScrollBarMode.Visible;
grid1.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;

Concept

Online Demo

ASPxGridView - Scrolling

See Also