DetailsView.CreateControlStyle 方法

定义

创建 DetailsView 控件的默认表样式对象。Creates a default table style object for the DetailsView control.

protected:
 override System::Web::UI::WebControls::Style ^ CreateControlStyle();
protected override System.Web.UI.WebControls.Style CreateControlStyle ();
override this.CreateControlStyle : unit -> System.Web.UI.WebControls.Style
Protected Overrides Function CreateControlStyle () As Style

返回

一个 Style,包含 DetailsView 控件的默认表样式。A Style that contains the default table style for the DetailsView control.

注解

CreateControlStyle 方法是 DetailsView 控件调用的帮助器方法,用于创建其默认表样式对象。The CreateControlStyle method is a helper method called by the DetailsView control to create its default table style object. 除了 TableStyle 对象的默认样式设置外,此方法还设置下表中的属性。In addition to the default style setting of a TableStyle object, this method also sets the properties in the following table.

propertiesProperty 初始值Initial value
GridLines GridLines.Both
CellSpacing 00

继承者说明

扩展 DetailsView 类时,可以重写此方法以返回具有自定义设置的 TableStyle 对象。When extending the DetailsView class, you can override this method to return a TableStyle object with custom settings.

适用于

另请参阅