'Declaration Public Sub ScrollCellIntoView( _ ByVal cell As UltraGridCell, _ ByVal colScrollRegion As ColScrollRegion _ )
public void ScrollCellIntoView( UltraGridCell cell, ColScrollRegion colScrollRegion )
Invoke this method to ensure that a cell is viewable in a column or row scrolling region.
If this method is invoked for a colscrollregion and the column is already in the viewable area of the region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated. If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll, ScrollColumnIntoView, ScrollGroupIntoView, and ScrollRowIntoView methods can also be invoked to scroll an object into a scrolling region's viewable area.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button136_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button136.Click Dim cell As UltraGridCell = Me.UltraGrid1.Rows(20).Cells(2) ' Set the back color of the cell so we can identify it on the screen. cell.Appearance.BackColor = Color.LightSkyBlue ' Get the row-scroll-region and the column-scroll-region to scroll the cell into view. Dim rsr As RowScrollRegion = Me.UltraGrid1.ActiveRowScrollRegion Dim csr As ColScrollRegion = Me.UltraGrid1.ActiveColScrollRegion ' Scroll the cell into view in the scroll region formed by the intersection of ' rsr RowScrollRegion and csr ColScrollRegion. rsr.ScrollCellIntoView(cell, csr) ' ScrollCellIntoView also does the same thing. You need to call just one of these ' to scroll a cell into view. Only difference is that ColScrollRegion.ScrollCellIntoView ' takes a leftAlign parameter that indicates whether to scroll the cell all the way to ' the left. csr.ScrollCellIntoView(cell, rsr, False) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button136_Click(object sender, System.EventArgs e) { UltraGridCell cell = this.ultraGrid1.Rows[20].Cells[2]; // Set the back color of the cell so we can identify it on the screen. cell.Appearance.BackColor = Color.LightSkyBlue; // Get the row-scroll-region and the column-scroll-region to scroll the cell into view. RowScrollRegion rsr = this.ultraGrid1.ActiveRowScrollRegion; ColScrollRegion csr = this.ultraGrid1.ActiveColScrollRegion; // Scroll the cell into view in the scroll region formed by the intersection of // rsr RowScrollRegion and csr ColScrollRegion. rsr.ScrollCellIntoView( cell, csr ); // ScrollCellIntoView also does the same thing. You need to call just one of these // to scroll a cell into view. Only difference is that ColScrollRegion.ScrollCellIntoView // takes a leftAlign parameter that indicates whether to scroll the cell all the way to // the left. csr.ScrollCellIntoView( cell, rsr, false ); }
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