DataGridColumn.CanUserSort 屬性

定義

取得或設定值,該值指出使用者是否可藉由按一下欄標題來排序欄。

public:
 property bool CanUserSort { bool get(); void set(bool value); };
public bool CanUserSort { get; set; }
member this.CanUserSort : bool with get, set
Public Property CanUserSort As Boolean

屬性值

如果使用者可以排序資料行,則為 true,否則為 false。 已註冊的預設值是 true。 如需哪些因素會影響值的詳細資訊,請參閱 DependencyProperty

備註

您可以藉由設定 屬性來設定所有資料行的 DataGrid.CanUserSortColumns 這個排序行為。 DataGridColumn.CanUserSort如果同時設定 屬性和 DataGrid.CanUserSortColumns 屬性,則 false 的值會優先于 的值 true

適用於

另請參閱