Gets or sets a value indicating whether the grid is in read-only mode.
[Visual Basic] Public Property ReadOnly As Boolean [C#] public bool ReadOnly {get; set;} [C++] public: __property bool get_ReadOnly(); public: __property void set_ReadOnly(bool); [JScript] public function get ReadOnly() : Boolean; public function set ReadOnly(Boolean);
true if the grid is in read-only mode; otherwise, false. The default is false.
In read-only mode, the grid can be scrolled, nodes can be expanded or collapsed, and so on, But no additions, edits, or deletes may take place.
The following example toggles the ReadOnly property.
[Visual Basic]
Private Sub ToggleReadOnly(ByVal myGrid As DataGrid) myGrid.ReadOnly = myGrid.ReadOnly Xor True End Sub
DataGrid Class | DataGrid Members | System.WinForms Namespace