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

Used to specify the relationship between a column or group and another one in the same band in visible position order.

Syntax

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

Members

MemberDescription
First First column or group in the band in visible position order.
Last Last column or group in the band in visible position order.
Next Next column or group in the band in visible position order.
Previous Previous column or group in the band in visible position order.

Example

Following code uses GetRelatedVisibleColumn method to print out column keys of all the visible columns in visible order of left to right.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Button131_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button131.Click

       Dim column As UltraGridColumn = Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0)

       Debug.WriteLine("Columns in visible order: ")

       ' Get the first visible column by passing in VisibleRelation.First.
       column = column.GetRelatedVisibleColumn(VisibleRelation.First)

       While Not column Is Nothing
           Debug.WriteLine("   " & column.Key)

           ' Get the next visible column by passing in VisibleRelation.Next.
           column = column.GetRelatedVisibleColumn(VisibleRelation.Next)
       End While

   End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

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

	UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns[0];

	Debug.WriteLine( "Columns in visible order: ");

	// Get the first visible column by passing in VisibleRelation.First.
	column = column.GetRelatedVisibleColumn( VisibleRelation.First );

	while ( null != column )
	{
		Debug.WriteLine( "   " + column.Key );

		// Get the next visible column by passing in VisibleRelation.Next.
		column = column.GetRelatedVisibleColumn( VisibleRelation.Next );
	}

}

Remarks

The VisibleRelation enum is used for specifying which column to get in when calling Column's UltraGridColumn.GetRelatedVisibleColumn method.

See Also