IFieldTemplateFactory.CreateFieldTemplate(MetaColumn, DataBoundControlMode, String) 方法

定义

使用 MetaColumn 类、DataBoundControlMode 类和 UIHint 属性创建字段模板的实例。Creates an instance of a field template using the MetaColumn class, the DataBoundControlMode class and UIHint property.

public:
 System::Web::DynamicData::IFieldTemplate ^ CreateFieldTemplate(System::Web::DynamicData::MetaColumn ^ column, System::Web::UI::WebControls::DataBoundControlMode mode, System::String ^ uiHint);
public System.Web.DynamicData.IFieldTemplate CreateFieldTemplate (System.Web.DynamicData.MetaColumn column, System.Web.UI.WebControls.DataBoundControlMode mode, string uiHint);
abstract member CreateFieldTemplate : System.Web.DynamicData.MetaColumn * System.Web.UI.WebControls.DataBoundControlMode * string -> System.Web.DynamicData.IFieldTemplate
Public Function CreateFieldTemplate (column As MetaColumn, mode As DataBoundControlMode, uiHint As String) As IFieldTemplate

参数

column
MetaColumn

指定要用于显示字段模板的数据列。Specifies the data column to use to display the field template.

mode
DataBoundControlMode

指定字段模板的显示模式。Specifies the display mode of the field template.

uiHint
String

指定要使用的字段模板。Specifies the field template to use.

返回

IFieldTemplate

在类中实现时的 FieldTemplateFactory 对象的实例。An instance of a FieldTemplateFactory object when implemented in a class.

注解

ASP.NET 动态数据字段模板是将数据控件映射到数据模型中的数据类型的 ASP.NET 用户控件。ASP.NET Dynamic Data field templates are ASP.NET user controls that map data controls to data types in a data model. 字段模板通常派生自 FieldTemplateUserControl ,该类可用于访问数据模型中的数据字段、数据列和元数据。Field templates generally derive from FieldTemplateUserControl, the class that enables access to data fields, data columns, and metadata in data models. 动态数据项目提供默认字段模板,但你可以对其进行修改或创建自定义字段模板。Dynamic Data projects provide default field templates, but you can modify them or create custom field templates. 实现时,此方法基于数据列、数据列的模式和属性创建字段模板 UIHintWhen implemented, this method creates a field template based on the data column, the mode of the data column, and the UIHint property. uiHint如果要使用自定义字段模板呈现数据,请指定参数。You specify the uiHint parameter if you want to render data using a custom field template.

适用于