System.Web.UI.WebControls Namespace DataGridPageChangedEventArgs Class
Initializes a new instance of the DataGridPageChangedEventArgs class.
[ VB ]
Public Sub New ( _
ByVal commandSource As Object, _
ByVal newPageIndex As Integer _
)
[ C# ]
public DataGridPageChangedEventArgs (
object commandSource,
int newPageIndex
);
[ C++ ]
public: DataGridPageChangedEventArgs (
Object* commandSource,
int newPageIndex
);
[ JScript ]
public function DataGridPageChangedEventArgs (
commandSource : Object,
newPageIndex : int
);
- commandSource
- The source of the command.
- newPageIndex
- The index of the page selected by the user from the page selection element of the DataGrid control.
Use this constructor to initialize a new instance of the DataGridPageChangedEventArgs class.
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 |
The commandSource parameter. |
NewPageIndex |
The newPageIndex parameter. |
The following example demonstrates how to initialize a new instance of the DataGridPageChangedEventArgs class.
void myPageChangedHandler ( Object src, DataGridPageChangedEventArgs e ) {
DataGridPageChangedEventArgs args = new DataGridPageChangedEventArgs (
e.CommandSource, e.NewPageIndex );
}
Sub myPageChangedHandler ( Byval src As Object, e As DataGridPageChangedEventArgs )
Dim args As New DataGridPageChangedEventArgs (
e.CommandSource, e.NewPageIndex )
End Sub |
|
C# |
VB |
DataGridPageChangedEventArgs Members