DataGridColumn.IsReadOnly 屬性

定義

取得或設定值,該值指出是否可編輯欄中的儲存格。

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

屬性值

Boolean

如果無法編輯資料行中的儲存格,則為 true,否則為 false。 已註冊的預設值是 false。 如需哪些因素會影響值的詳細資訊,請參閱 DependencyProperty

備註

IsReadOnly 屬性設定為 true ,讓個別資料行中的所有儲存格成為唯讀。 將 DataGrid.IsReadOnly 屬性設定為 true ,讓所有儲存格成為 DataGrid 唯讀。 將 DataGridCell.IsReadOnly 屬性設定為 true ,讓個別儲存格成為唯讀。 如果 、資料行或儲存格層級的 DataGrid 設定之間存在衝突,則 true 的值會優先于 的值 false

適用於

另請參閱