共用方式為


NextPreviousPagerField.RenderDisabledButtonsAsLabels 屬性

定義

取得或設定值,這個值會指出 Label 物件是否將停用的按鈕呈現為 NextPreviousPagerField 控制項。

public:
 property bool RenderDisabledButtonsAsLabels { bool get(); void set(bool value); };
public bool RenderDisabledButtonsAsLabels { get; set; }
member this.RenderDisabledButtonsAsLabels : bool with get, set
Public Property RenderDisabledButtonsAsLabels As Boolean

屬性值

Boolean

如果停用的按鈕呈現為 Label 控制項,則為 true,否則為 false。 預設為 false

備註

RenderDisabledButtonsAsLabels使用 屬性可指定停用的按鈕是否由 NextPreviousPagerField 物件轉譯為 Label 控制項。 當無法執行與按鈕相關聯的函式時,物件會停用 NextPreviousPagerField 按鈕。 例如,當您位於資料的第一頁時,會停用第一頁和上一頁按鈕。

根據預設, NextPreviousPagerField 物件會使用 屬性指定的控制項類型來轉譯停用的 ButtonType 按鈕。 它也會將 Enabled 控制項的 屬性設定為 false

當 設定為 trueRenderDisabledButtonsAsLabelsNextPreviousPagerField 物件會 Label 使用 控制項來轉譯停用的按鈕。 屬性的值 ButtonCssClass 是用來設定 CssClass 控制項的 Label 屬性。

此屬性的值會儲存在 viewstate 中。

適用於

另請參閱