FieldTemplateFactory.PreprocessMode Method (MetaColumn, DataBoundControlMode)

 

Changes the mode of the data column.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public virtual DataBoundControlMode PreprocessMode(
	MetaColumn column,
	DataBoundControlMode mode
)

Parameters

column
Type: System.Web.DynamicData.MetaColumn

The column for which the field template is needed.

mode
Type: System.Web.UI.WebControls.DataBoundControlMode

The mode (Read Only, Edit, or Insert) to change to.

Return Value

Type: System.Web.UI.WebControls.DataBoundControlMode

The mode that a column renders.

Dynamic Data renders data in Read Only, Insert, or Edits modes. This method controls which mode is rendered in the column. For example, an Edit mode request changes to Read Only if the column is a primary key column. Columns that are automatically generated and foreign keys that are part of the primary key cannot be edited.

.NET Framework
Available since 3.5
Return to top
Show: