Version

Scrollbar Property

Returns or sets a value that indicates whether a scroll bar will be displayed for a scrolling region.
Syntax
'Declaration
 
Public Property Scrollbar As Scrollbar
public Scrollbar Scrollbar {get; set;}
Remarks

This property determines whether a scroll bar should be displayed for a scrolling region.

When a colscrollregion is scrolled, the BeforeColRegionScroll event is generated. When a rowscrollregion is scrolled, the BeforeRowRegionScroll event is generated.

A scrolling region can be scrolled programmatically, even if no scroll bars are displayed, by invoking its Scroll method.

The user can be prevented from scrolling a colscrollregion or rowscrollregion, even if its scroll bars are displayed, by setting the cancel argument of the BeforeColRegionScroll or BeforeRowRegionScroll event, respectively, to True.

The current, as well as maximum, position of a colscrollregion's scroll bar can be determined by its Range and Position properties, respectively.

The ScrollBars property can be used to set the value of the ScrollBar property for all colscrollregions and rowscrollregions that have their ScrollBar property set to 0 (ScrollBarDefault).

Example
Following code splits the first row scroll region into two and set the ScrollBar property of the first one to Hide so the scroll bar in that row-scroll-region is hidden.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button5.Click

      ' Split the first row-scroll-region and col-scroll-region into two.
      Me.UltraGrid1.DisplayLayout.RowScrollRegions(0).Split()
      Me.UltraGrid1.DisplayLayout.ColScrollRegions(0).Split()

      ' Set the ScrollBar to Hide.
      Me.UltraGrid1.DisplayLayout.RowScrollRegions(0).Scrollbar = Infragistics.Win.UltraWinGrid.Scrollbar.Hide
      Me.UltraGrid1.DisplayLayout.ColScrollRegions(0).Scrollbar = Infragistics.Win.UltraWinGrid.Scrollbar.Hide

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button5_Click(object sender, System.EventArgs e)
{

	// Split the first row-scroll-region and col-scroll-region into two.
	this.ultraGrid1.DisplayLayout.RowScrollRegions[0].Split( );
	this.ultraGrid1.DisplayLayout.ColScrollRegions[0].Split( );

	// Set the ScrollBar to Hide.
	this.ultraGrid1.DisplayLayout.RowScrollRegions[0].Scrollbar = Infragistics.Win.UltraWinGrid.Scrollbar.Hide;
	this.ultraGrid1.DisplayLayout.ColScrollRegions[0].Scrollbar = Infragistics.Win.UltraWinGrid.Scrollbar.Hide;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also