GridViewCommandEventArgs Class
Assembly: System.Web (in system.web.dll)
The RowCommand event is raised when a button within the GridView control is clicked. This allows you to provide an event-handling method that performs a custom routine whenever this event occurs.
Note: |
|---|
| The GridView control also raises other specialized events when certain buttons are clicked (buttons with the CommandName property set to "Delete", "Update", and "Page" for example). When using one of these buttons, you should consider handling one of the specialized events provided by the control (such as RowDeleted or RowDeleting). |
A GridViewCommandEventArgs object is passed to the event-handling method, which allows you to determine the command name and command argument of the button clicked. To determine the command name and command argument, use the CommandName and CommandArgument properties, respectively. You can also access the button control that raised the event by using the CommandSource property.
For more information about handling events, see Consuming Events.
For a list of initial property values for an instance of GridViewCommandEventArgs, see the GridViewCommandEventArgs constructor.
- AspNetHostingPermission For operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission For operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
System.Web.UI.WebControls.GridViewCommandEventArgs
Note: