セルの値が変更されたときにイベント処理を行うことはできますか

セルの値が変更されたとき、GcMultiRow.CellValueChangedイベントが発生します。

CellValueChangedイベントでセル型やCell.Nameプロパティを使用して、特定のセルの値が変更された場合に処理を行うことが可能です。

 

using GrapeCity.Win.MultiRow;



private void gcMultiRow1_CellValueChanged(object sender, CellEventArgs e)

{

// Cell.Nameプロパティが”textBoxCell1”の場合

if (e.CellName == “textBoxCell1”)

{

Console.WriteLine(”textBoxCell1:{0}, RowIndex:{1}, CellIndex:{2}”, gcMultiRow1.GetValue(e.RowIndex, e.CellIndex), e.RowIndex, e.CellIndex);

}



// NumericUpDownCell型セルの場合

if (gcMultiRow1.CurrentCell is NumericUpDownCell)

{

Console.WriteLine(”数値型セル:{0}, RowIndex:{1}, CellIndex:{2}”, gcMultiRow1.GetValue(e.RowIndex, e.CellIndex), e.RowIndex, e.CellIndex);

}

}



 

 

 

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です