DataGridPageChangedEventArgs(Object, Int32) Konstruktor

Definice

Inicializuje novou instanci DataGridPageChangedEventArgs třídy.

public:
 DataGridPageChangedEventArgs(System::Object ^ commandSource, int newPageIndex);
public DataGridPageChangedEventArgs(object commandSource, int newPageIndex);
new System.Web.UI.WebControls.DataGridPageChangedEventArgs : obj * int -> System.Web.UI.WebControls.DataGridPageChangedEventArgs
Public Sub New (commandSource As Object, newPageIndex As Integer)

Parametry

commandSource
Object

Zdroj příkazu.

newPageIndex
Int32

Index stránky vybrané uživatelem z prvku DataGrid výběru stránky ovládacího prvku

Příklady

Následující příklad kódu ukazuje, jak vytvořit a inicializovat novou instanci DataGridPageChangedEventArgs třídy.

void Grid_Change(Object sender, DataGridPageChangedEventArgs e)
{
   DataGridPageChangedEventArgs page_change_args = new DataGridPageChangedEventArgs(e.CommandSource, e.NewPageIndex);
}
Sub Grid_Change(sender As Object, e As DataGridPageChangedEventArgs)
    Dim page_change_args As New DataGridPageChangedEventArgs(e.CommandSource, e.NewPageIndex)
End Sub

Poznámky

Tento konstruktor slouží k vytvoření a inicializaci nové instance DataGridPageChangedEventArgs třídy.

Pokud je instance DataGridCommandEventArgs vytvořena voláním tohoto konstruktoru, následující vlastnosti jsou inicializovány na zadané hodnoty.

Properties Počáteční hodnota
CommandSource Parametr commandSource .
NewPageIndex Parametr newPageIndex .

Platí pro