DataPager.CreatePagerFields DataPager.CreatePagerFields DataPager.CreatePagerFields DataPager.CreatePagerFields Method


建立由 DataPagerField 控制項的 Fields 屬性所包含的 DataPager 物件。Creates the DataPagerField objects that are contained by the Fields property of the DataPager control.

 virtual void CreatePagerFields();
protected virtual void CreatePagerFields ();
abstract member CreatePagerFields : unit -> unit
override this.CreatePagerFields : unit -> unit
Protected Overridable Sub CreatePagerFields ()


CreatePagerFields方法是OnTotalRowCountAvailable由屬性和方法用來DataPagerField Fields建立屬性所包含的物件。 PageSizeThe CreatePagerFields method is used by the PageSize property and by the OnTotalRowCountAvailable method to create the DataPagerField objects that are contained by the Fields property. 這個方法會呼叫DataPagerField.CreateDataPagers方法, 針對集合中的每個欄位建立使用者介面 (UI) 控制項。This method calls the DataPagerField.CreateDataPagers method to create the user interface (UI) controls for each field in the collection.

DataPager控制項中建立呼機欄位的方式, 會依照頁面出現Fields在集合中的分頁順序。The pager fields are created in the DataPager control in the order that the pager fields appear in the Fields collection. 下表顯示衍生自DataPagerField類別, 且可DataPager在控制項中建立的頁面分頁類別。The following table shows the pager field classes that derive from the DataPagerField class and that can be created in the DataPager control.

呼機欄位類型Pager field type 說明Description
NextPreviousPagerField 可讓使用者一次流覽一頁的資料頁面, 或跳到資料的第一個或最後一頁。Enables users to navigate through pages of data one page at a time, or to jump to the first or last page of data.
NumericPagerField 可讓使用者依頁碼選取資料頁面。Enables users to select a page of data by page number.
TemplatePagerField 可讓您建立自訂分頁 UI。Enables you to create a custom paging UI.