DetailsView.CreateControlStyle 方法

定義

建立 DetailsView 控制項的預設資料表樣式物件。

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

Style,包含 DetailsView 控制項的預設資料表樣式。

備註

方法是 CreateControlStyle 控制項所 DetailsView 呼叫的協助程式方法,可建立其預設資料表樣式物件。 除了物件的預設樣式設定 TableStyle 之外,這個方法也會設定下表中的屬性。

屬性 初始值
GridLines GridLines.Both
CellSpacing 0

給繼承者的注意事項

擴充 DetailsView 類別時,您可以覆寫這個方法,以傳回 TableStyle 具有自訂設定的物件。

適用於

另請參閱