Infragistics(R) NetAdvantage(R) Windows Forms
Scrollbar Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : Scrollbar Enumeration

Determines if a scrollbar will be shown on a specific row or column scroll region

Syntax

Visual Basic (Declaration) 
Public Enum Scrollbar 
   Inherits System.Enum
C# 
public enum Scrollbar : System.Enum 

Members

MemberDescription
Default Default. The grid's ScrollBars property value determines if scrollbars are shown.
Hide do not show the scroll bar
Show always show the scroll bar
ShowIfNeeded only show it if needed

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.

Visual BasicCopy Code
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
C#Copy Code
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;

}

See Also