DataPagerCommandEventArgs Class

 

Provides data for the PagerCommand event of the TemplatePagerField class.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

System.Object
  System.EventArgs
    System.Web.UI.WebControls.CommandEventArgs
      System.Web.UI.WebControls.DataPagerCommandEventArgs

type DataPagerCommandEventArgs = 
    class
        inherit CommandEventArgs
    end

NameDescription
System_CAPS_pubmethodDataPagerCommandEventArgs(DataPagerField, Int32, CommandEventArgs, DataPagerFieldItem)

Initializes a new instance of the DataPagerCommandEventArgs class.

NameDescription
System_CAPS_pubpropertyCommandArgument

Gets the argument for the command.(Inherited from CommandEventArgs.)

System_CAPS_pubpropertyCommandName

Gets the name of the command.(Inherited from CommandEventArgs.)

System_CAPS_pubpropertyItem

Gets the DataPagerFieldItem object that contains the DataPagerField object and the DataPagerField object's container DataPager object.

System_CAPS_pubpropertyNewMaximumRows

Gets or sets the maximum number of records to display on each page of data.

System_CAPS_pubpropertyNewStartRowIndex

Gets or sets the index of the first record to display on a page of data.

System_CAPS_pubpropertyPagerField

Gets the DataPagerField object that contains the button that was clicked.

System_CAPS_pubpropertyTotalRowCount

Gets the total number of records to display.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The TemplatePagerField object raises the PagerCommand event when a Button, LinkButton, or ImageButton control that is inside the pager field is clicked. These buttons are child controls that can be defined in the PagerTemplate template of a TemplatePagerField field.

During the event, you can perform tasks such as changing the number of rows that will be displayed or changing the index of the first item on the page.

For more information about how to handle events, see NIB: Consuming Events.

For a list of initial property values for an instance of the DataPagerCommandEventArgs class, see the DataPagerCommandEventArgs constructor.

The following example shows how to use the DataPagerCommandEventArgs object to enable the user to specify which page of data will be displayed in the ListView control. The DataPagerCommandEventArgs object is passed to the handler for the PagerCommand event of the TemplatePagerField class.

System_CAPS_security Security Note

This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: