DetailsView.IsBindableType(Type) 方法

定义

确定指定的数据类型是否可以绑定到 DetailsView 控件中的字段。Determines whether the specified data type can be bound to a field in the DetailsView control.

public:
 virtual bool IsBindableType(Type ^ type);
public virtual bool IsBindableType (Type type);
abstract member IsBindableType : Type -> bool
override this.IsBindableType : Type -> bool

参数

type
Type

表示要检查的数据类型的 TypeA Type that represents the data type to check.

返回

如果指定的数据类型可以绑定到 DetailsView 控件中的字段,则为 true;否则为 falsetrue if the specified data type can be bound to a field in the DetailsView control; otherwise, false.

注解

IsBindableType方法是DetailsView由控件调用的帮助器方法, 用于确定指定的数据类型是否可绑定到控件中的字段。The IsBindableType method is a helper method called by the DetailsView control to determine whether the specified data type can be bound to a field in the control. DetailsView控件支持以下数据类型:The DetailsView control supports the following data types:

所有基元数据类型, 如Boolean、和ByteInt32All primitive data types, such as Boolean, Byte, and Int32

DateTime

Decimal

Guid

String

继承者说明

扩展DetailsView类时, 可以重写此方法, 以添加或限制可DetailsView在控件中使用的数据类型。When extending the DetailsView class, you can override this method to add or restrict the data types that can be used in a DetailsView control.

适用于

另请参阅