Edit this page

Enable Horizontal and Vertical Scrollbar

In order to enable horizontal and/or vertical scrollbars you need to set the ScrollViewer's attached properties HorizontalScrollBarVisibility and/or VerticalScrollBarVisibility.

[XAML] Example 1: Set Attached ScrollViewer Properties

<telerik:RadGridView x:Name="radGridView" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"/>

The same operation can be done in code-behind:

[C#] Example 1: Set Attached ScrollViewer Properties

private void EnableScrollBars()
{
    ScrollViewer.SetHorizontalScrollBarVisibility(this.radGridView, ScrollBarVisibility.Visible);
    ScrollViewer.SetVerticalScrollBarVisibility(this.radGridView, ScrollBarVisibility.Visible);
}

[VB.NET] Example 1: Set Attached ScrollViewer Properties

Private Sub EnableScrollBars()
    ScrollViewer.SetHorizontalScrollBarVisibility(Me.radGridView, ScrollBarVisibility.Visible)
    ScrollViewer.SetVerticalScrollBarVisibility(Me.radGridView, ScrollBarVisibility.Visible)
End Sub

The result is illustrated in Figure 1.

Figure 1: RadGridView with vertical and horizontal scrollbars

RadGridView with vertical and horizontal scrollbars

See Also