System.Web.UI.WebControls Namespace BoundColumn Class
Sets or retrieves a value that indicates whether the data in the BoundColumn can be modified.
Inline |
<asp:boundcolumn readonly [ = true | false ] ... > |
Script |
BoundColumn.ReadOnly [ = true | false ] |
This property accepts or returns only a boolean value: true if the column cannot be modified; otherwise false. Default value is false.
Use the ReadOnly property to prevent modification to the data bound to the column. This property can also be used to programmatically determine whether the column is read-only.
The following example demonstrates how to set the ReadOnly property at design time, to prevent modification to the data in a BoundColumn.
<asp:boundcolumn readonly
headertext = "Item"
datafield = "title_id" />
Show me
BoundColumn Members Adding Bound Columns to a DataGrid Control