NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.ReadOnly

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);

Property Value

true if the grid is in read-only mode; otherwise, false. The default is false.

Remarks

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.

Example [Visual Basic]

The following example toggles the ReadOnly property.

[Visual Basic]

Private Sub ToggleReadOnly(ByVal myGrid As DataGrid)
   myGrid.ReadOnly = myGrid.ReadOnly Xor True
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace