Skip to main content

ASPxNavBar.ExpandedChanged Event

Fires on the server side after a group’s expansion state has been changed.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll


public event NavBarGroupEventHandler ExpandedChanged

Event Data

The ExpandedChanged event's data class is NavBarGroupEventArgs. The following properties provide information specific to this event:

Property Description
Group Gets a group for which the event is fired.


Write an ExpandedChanged event handler to perform specific actions on the server side each time after a group’s expansion state has been changed. You can use the event parameter’s NavBarGroupEventArgs.Group property to identify the group which has been expanded or collapsed.


The full sample code can be obtained by using the How to create and load a NavBar group content on a callback example.

public partial class ASPxperience_LoadOnCallback : System.Web.UI.Page {
     protected void LoadGroupContent(NavBarGroup group) {
         Control control = null;
         if(group.Expanded && group.ContentTemplate == null) {
             switch(group.Name) {
                 case "Group1":
                 case "Group2":
                     control = LoadControl("UserControl.ascx");
             group.ContentTemplate = control as ITemplate;
     protected void LoadExpandedGroups() {
         for(int i = 0; i < ASPxNavBar1.Groups.Count; i++)

     protected void Page_Load(object sender, EventArgs e) {
     protected void ASPxNavBar1_ExpandedChanged(object source, 
     DevExpress.Web.NavBarGroupEventArgs e) {
See Also