バージョン

CancelableCellEventHandler デリゲート

イベント引数としてCancelableCellEventArgsを取得するイベントを処理するためのデリゲート。
シンタックス
'宣言
 
Public Delegate Sub CancelableCellEventHandler( _
   ByVal sender As Object, _
   ByVal e As CancelableCellEventArgs _
) 
public delegate void CancelableCellEventHandler( 
   object sender,
   CancelableCellEventArgs e
)

パラメータ

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

  Private Sub UltraGrid1_BeforeCellActivate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelableCellEventArgs) Handles ultraGrid1.BeforeCellActivate

      ' Set the appearance of the cell right before the cell is about to be activated.
      ' In the BeforeCellDeactivate, we will reset the BackColor.
      e.Cell.Appearance.BackColor = Color.LightYellow

  End Sub

  Private Sub UltraGrid1_BeforeCellDeactivate(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ultraGrid1.BeforeCellDeactivate

      ' Reset BackColor the appearance of the cell right before the cell is about
      ' to be deactivated.
      Me.ultraGrid1.ActiveCell.Appearance.ResetBackColor()

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

private void ultraGrid1_BeforeCellActivate(object sender, Infragistics.Win.UltraWinGrid.CancelableCellEventArgs e)
{

	// Set the appearance of the cell right before the cell is about to be activated.
	// In the BeforeCellDeactivate, we will reset the BackColor.
	e.Cell.Appearance.BackColor = Color.LightYellow;

}

private void ultraGrid1_BeforeCellDeactivate(object sender, System.ComponentModel.CancelEventArgs e)
{

	// Reset BackColor the appearance of the cell right before the cell is about
	// to be deactivated.
	this.ultraGrid1.ActiveCell.Appearance.ResetBackColor( );

}
参照