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

Pomocí tohoto konstruktoru můžete vytvořit a inicializovat novou instanci DataGridPageChangedEventArgs třídy .

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

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

Platí pro