'宣言 Public Event BeforeSelChange As RangeEventHandler
public event RangeEventHandler BeforeSelChange
イベント データ
イベント ハンドラが、このイベントに関連するデータを含む、RangeEventArgs 型の引数を受け取りました。次の RangeEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Cancel | Gets or sets a value indicating whether the new selection should be canceled. |
NewRange | Gets the range that will be selected after the event. |
OldRange | Gets the range selected before the event. |
解説
This event fires before the RowSel and ColSel properties change, either as a result of user actions or through code. It allows you to prevent the selection of certain cells, thus creating "protected" ranges on a grid.
To prevent the selection of a range, you also need to handle the BeforeRowColChange event, which is fired before the Row and Col properties change.
参照