'宣言 Public Event BeforeSort As SortColEventHandler
public event SortColEventHandler BeforeSort
イベント データ
イベント ハンドラが、このイベントに関連するデータを含む、SortColEventArgs 型の引数を受け取りました。次の SortColEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Cancel | Gets or sets a value indicating whether the drag operation should be canceled. |
Col | Gets the column that is being sorted. |
Handled | Gets or sets a value indicating whether the drag operation has been handled by the event handler. |
Order | Gets or sets a SortFlags value that determines the sorting order. |
解説
This event only fires if the sorting was caused by a click on a column header. It does not fire before sorting with the Sort(SortFlags,Int32) method.
This event is useful when you want to prevent the user from sorting certain columns or to specify custom sorting orders for specific columns. You may do so by modifying the value of the SortColEventArgs.Order parameter.
参照