Version

GetFirstVisibleCol(ColScrollRegion,Boolean) Method

Returns the first visible column in the passed in column scrolling region.
Syntax
'Declaration
 
Public Overloads Function GetFirstVisibleCol( _
   ByVal csr As ColScrollRegion, _
   ByVal includeNonActivateable As Boolean _
) As UltraGridColumn
public UltraGridColumn GetFirstVisibleCol( 
   ColScrollRegion csr,
   bool includeNonActivateable
)

Parameters

csr
An existing column scrolling region.
includeNonActivateable
true to include columns that are not navigable activateable.

Return Value

The first visible column in the passed in column scrolling region.
Remarks

Use this method to determine which is the first (leftmost) visible column in a specific column scrolling region.

Example
Following code prints out the column key of the first column that's not hidden in the band.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Button144_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button144.Click

       Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

       ' Get the first visible column in the active column scroll region from this band.
       Dim column As UltraGridColumn = band.GetFirstVisibleCol(Me.UltraGrid1.ActiveColScrollRegion, True)

       ' If there is a column from band 0 visible, then write out its key.
       If Not column Is Nothing Then
           Debug.WriteLine("First visible column is " & column.Key)
       Else
           Debug.WriteLine("No column from band 0 is visible in the active col scroll region.")
       End If

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

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

	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
	
	// Get the first visible column in the active column scroll region from this band.
	UltraGridColumn column = band.GetFirstVisibleCol( this.ultraGrid1.ActiveColScrollRegion, true );

	// If there is a column from band 0 visible, then write out its key.
	if ( null != column )
	{
		Debug.WriteLine( "First visible column is " + column.Key );
	}
	else
	{
		Debug.WriteLine( "No column from band 0 is visible in the active col scroll region." );
	}

}
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