Fires when a control contained within a templated area of a group raises the Command event.
The GroupCommand event's data class is NavBarGroupCommandEventArgs. The following properties provide information specific to this event:
|CommandArgument||Gets the argument for the command. Inherited from CommandEventArgs.|
|CommandName||Gets the name of the command. Inherited from CommandEventArgs.|
|CommandSource||Gets an object representing the control which forced a postback.|
|Group||Gets a group object related to the event.|
The navbar control allows different areas of its groups (such as a group’s client region and header) to be customized through defining templates. A template for a group’s client region can be specified by the ASPxNavBar.GroupContentTemplate or NavBarGroup.ContentTemplate property; a header template can be defined via the ASPxNavBar.GroupHeaderTemplate or NavBarGroup.HeaderTemplate property. A template is a set of HTML elements and controls which constitute a layout for a particular element.
The GroupCommand event is fired when the control contained within a templated group area raises the Command event. The GroupCommand event is commonly used when a specific command name is associated with a button control. This allows you to create multiple button controls within different templated group areas and programmatically determine which button control is clicked.
Write an GroupCommand event handler to perform specific actions each time the Command event is raised by the control contained within any templated area of a group (the group’s client region or header). The GroupCommand event provides a parameter of the NavBarGroupCommandEventArgs type.