Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
' Set the scroll style to Imeediate so the UltraGrid scrolls the rows immediately
' as soon as the user drags the thumb rather than waiting untill the scroll thumb is
' released.
Me.UltraGrid1.DisplayLayout.ScrollStyle = ScrollStyle.Immediate
' Scrollbars indicates which of the vertical and horizontal scrollbar if any
' gets shown and how.
Me.UltraGrid1.DisplayLayout.Scrollbars = Scrollbars.Both
' Set the ColumnScrollbarSmallChange to 100 to specify that the grid scroll 100
' pixels when the left or right arrows of the horizontal scroll bar is clicked.
Me.UltraGrid1.DisplayLayout.ColumnScrollbarSmallChange = 100
' By default the UltraGrid uses ScrollWindow calls to scroll the control whenever
' up/down or left/right arrows of the scrollbars are clicked. This results in
' better scrolling performace however there might be instances, for example if
' you had a ui element creation filter or a draw filter, that required the grid
' to repaint the whole grid instead of using ScrollWindow, then set this property
' to None.
Me.UltraGrid1.DisplayLayout.UseScrollWindow = UseScrollWindow.None
' Fixed headers functionality can be turned on to prevent the grid from scrolling
' the row selectors when scrolled horizontally. Look at UseFixedHeaders property
' for more info.
Me.UltraGrid1.DisplayLayout.UseFixedHeaders = True
' Set verious scrollbar related properties using ScrollBarLook object returned
' by ScrollBarLook property.
Me.UltraGrid1.DisplayLayout.ScrollBarLook.MinMaxButtonsVisible = True
' Set the style of the scroll bar arrows.
Me.UltraGrid1.DisplayLayout.ScrollBarLook.ScrollBarArrowStyle = _
Infragistics.Win.UltraWinScrollBar.ScrollBarArrowStyle.BothAtRightBottom
' Set appearances for various ui elements of the scroll bar.
Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor = Color.Silver
Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackColor2 = Color.SkyBlue
Me.UltraGrid1.DisplayLayout.ScrollBarLook.Appearance.BackGradientStyle = GradientStyle.Vertical
Me.UltraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.BackColor = Color.Blue
Me.UltraGrid1.DisplayLayout.ScrollBarLook.ButtonAppearance.ForeColor = Color.LightYellow
' When true, scroll notifications as a result of a scroll arrow or scroll track click
' will occur synchronously thus giving scrolling higher priority when cpu intensive
' tasks are being performed.
Me.UltraGrid1.DisplayLayout.PriorityScrolling = True
End Sub