DataGridColumn.IsReadOnly DataGridColumn.IsReadOnly DataGridColumn.IsReadOnly DataGridColumn.IsReadOnly Property


取得或設定值,該值指出是否可編輯欄中的儲存格。Gets or sets a value that indicates whether cells in the column can be edited.

 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


如果無法編輯資料行中的儲存格,則為 true,否則為 falsetrue if cells in the column cannot be edited; otherwise, false. 已註冊的預設值是 falseThe registered default is false. 如需哪些因素會影響值的詳細資訊,請參閱 DependencyPropertyFor information about what can influence the value, see DependencyProperty.


將屬性設定為true ,讓個別資料行中的所有資料格變成隻讀。 IsReadOnlySet the IsReadOnly property to true to make all cells in an individual column read-only. 將屬性設定為trueDataGrid讓所有資料格變成隻讀。 DataGrid.IsReadOnlySet the DataGrid.IsReadOnly property to true to make all cells in the DataGrid read-only. 將屬性設定為true ,讓個別資料格變成隻讀。 DataGridCell.IsReadOnlySet the DataGridCell.IsReadOnly property to true to make an individual cell read-only. 如果DataGrid、資料行或資料格層級的設定之間存在衝突,則的true值會false優先于的值。If a conflict exists between the settings at the DataGrid, column, or cell levels, a value of true takes precedence over a value of false.