'宣言 Public Property ActiveCell As UltraGridCell
public UltraGridCell ActiveCell {get; set;}
このプロパティは、グリッドのアクティブセルに対応するCellオブジェクトを返します。このプロパティを既存の Cell オブジェクトに設定すると、そのセルがアクティブ セルになります。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Imports System.Diagnostics Private Sub Button32_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button32.Click ' Check if there is an active cell. If Not Me.ultraGrid1.ActiveCell Is Nothing Then ' Print out the the column key and the row index of the active cell. Debug.WriteLine("ActiveCell's column = " & Me.ultraGrid1.ActiveCell.Column.Key & ", Row Index = " & Me.ultraGrid1.ActiveCell.Row.Index.ToString()) Else Debug.WriteLine("There is no active cell.") End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button32_Click(object sender, System.EventArgs e) { // Check if there is an active cell. if ( this.ultraGrid1.ActiveCell != null ) { // Print out the the column key and the row index of the active cell. Debug.WriteLine( "ActiveCell's column = " + this.ultraGrid1.ActiveCell.Column.Key + ", Row Index = " + this.ultraGrid1.ActiveCell.Row.Index.ToString( ) ); } else { Debug.WriteLine( "There is no active cell." ); } }