バージョン

AfterColPosChangedEventHandler デリゲート

列の移動、サイズ変更または交換した後のデリゲート。
シンタックス
'宣言
 
Public Delegate Sub AfterColPosChangedEventHandler( _
   ByVal sender As Object, _
   ByVal e As AfterColPosChangedEventArgs _
) 
public delegate void AfterColPosChangedEventHandler( 
   object sender,
   AfterColPosChangedEventArgs e
)

パラメータ

sender
e
使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub UltraGrid1_AfterColPosChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.AfterColPosChangedEventArgs) Handles ultraGrid1.AfterColPosChanged

       ' ユーザーが列を移動、入れ替え、またはサイズ変更した後に AfterColPosChanged を
       ' 発生します

       If PosChanged.Moved = e.PosChanged Then
           ' 1 つ以上の列が移動されました

           Debug.WriteLine("Following are the new positions of the columns:")

           Dim i As Integer
           For i = 0 To e.ColumnHeaders.Length - 1
               Debug.WriteLine("    " & e.ColumnHeaders(i).Column.Key & " is moved to the new visible index of " & e.ColumnHeaders(i).VisiblePosition)
           Next
       ElseIf PosChanged.Swapped = e.PosChanged Then
           ' 2 つの列が入れ替えられています
           Debug.WriteLine(e.ColumnHeaders(0).Column.Key & " and " & e.ColumnHeaders(1).Column.Key & " columns have been swapped.")
       ElseIf PosChanged.Sized = e.PosChanged Then
           ' 列がサイズ変更されました
           Debug.WriteLine(e.ColumnHeaders(0).Column.Key & " has been resized to the new width of " & e.ColumnHeaders(0).Column.Width)
       End If

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

private void ultraGrid1_AfterColPosChanged(object sender, Infragistics.Win.UltraWinGrid.AfterColPosChangedEventArgs e)
{

	// ユーザーが列を移動、入れ替え、サイズ変更した後に AfterColPosChanged を
	// 発生します
	
	if ( PosChanged.Moved == e.PosChanged )
	{	
		// 1 つ以上の列が移動されました

		Debug.WriteLine( "Following are the new positions of the columns:" );

		for ( int i = 0; i < e.ColumnHeaders.Length; i++ )
		{										
			Debug.WriteLine( "    " + e.ColumnHeaders[i].Column.Key + 
				" is moved to the new visible index of " + e.ColumnHeaders[i].VisiblePosition );
		}
	}
	else if ( PosChanged.Swapped == e.PosChanged )
	{
		// 2 つの列が入れ替えられています

		Debug.WriteLine( e.ColumnHeaders[0].Column.Key + " and " + e.ColumnHeaders[1].Column.Key 
			+ " columns have been swapped." );				
	}
	else if ( PosChanged.Sized == e.PosChanged )
	{
		// 列がサイズ変更されました

		Debug.WriteLine( e.ColumnHeaders[0].Column.Key + 
			" has been resized to the new width of " + e.ColumnHeaders[0].Column.Width );
	}

}
参照