DataGridPageChangedEventArgs(Object, Int32) Конструктор
Определение
Инициализирует новый экземпляр класса DataGridPageChangedEventArgs.Initializes a new instance of the DataGridPageChangedEventArgs class.
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)
Параметры
- commandSource
- Object
Источник команды.The source of the command.
- newPageIndex
- Int32
Индекс страницы, выбранный из элемента выделения страницы для элемента управления DataGrid.The index of the page selected by the user from the page selection element of the DataGrid control.
Примеры
В следующем примере кода показано, как создать и инициализировать новый экземпляр DataGridPageChangedEventArgs класса.The following code example demonstrates how to create and initialize a new instance of the DataGridPageChangedEventArgs class.
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
Комментарии
Используйте этот конструктор для создания и инициализации нового экземпляра DataGridPageChangedEventArgs класса.Use this constructor to create and initialize a new instance of the DataGridPageChangedEventArgs class.
При создании экземпляра DataGridCommandEventArgs с помощью вызова этого конструктора следующие свойства инициализируются с указанными значениями.When an instance of DataGridCommandEventArgs is created by a call to this constructor, the following properties are initialized to the specified values.
СвойстваProperties | Исходное значениеInitial value |
---|---|
CommandSource | Параметр commandSource .The commandSource parameter. |
NewPageIndex | Параметр newPageIndex .The newPageIndex parameter. |