TemplatePagerField.CreateDataPagers(DataPagerFieldItem, Int32, Int32, Int32, Int32) 方法

定義

為頁面巡覽區欄位建立使用者介面 (UI) 控制項,並將它們加入至指定的容器。Creates the user interface (UI) controls for the pager field object and adds them to the specified container.

public:
 override void CreateDataPagers(System::Web::UI::WebControls::DataPagerFieldItem ^ container, int startRowIndex, int maximumRows, int totalRowCount, int fieldIndex);
public override void CreateDataPagers (System.Web.UI.WebControls.DataPagerFieldItem container, int startRowIndex, int maximumRows, int totalRowCount, int fieldIndex);
override this.CreateDataPagers : System.Web.UI.WebControls.DataPagerFieldItem * int * int * int * int -> unit
Public Overrides Sub CreateDataPagers (container As DataPagerFieldItem, startRowIndex As Integer, maximumRows As Integer, totalRowCount As Integer, fieldIndex As Integer)

參數

container
DataPagerFieldItem

用來儲存控制項的容器。The container that is used to store the controls.

startRowIndex
Int32

頁面上第一筆資料錄的索引。The index of the first record on the page.

maximumRows
Int32

單一頁面上的最大項目數。The maximum number of items on a single page.

totalRowCount
Int32

項目的總數。The total number of items.

fieldIndex
Int32

Fields 集合中資料頁面巡覽區欄位的索引。The index of the data pager field in the Fields collection.

備註

方法是DataPager.CreatePagerFields方法所使用的 helper 方法。 CreateDataPagersThe CreateDataPagers method is a helper method that is used by the DataPager.CreatePagerFields method. 方法會container將參數DataPagerFieldItem所指定的物件填入PagerTemplate範本中包含的子控制項。 CreateDataPagersThe CreateDataPagers method populates the DataPagerFieldItem object that is specified by the container parameter with the child controls that are contained in the PagerTemplate template.

適用於

另請參閱