Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BreadCrumbEdit.GoUp() Method

Navigates to the currently selected node’s parent node.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public void GoUp()

#Remarks

The GoUp method navigates to a BreadCrumbNode that contains the currently selected node in its BreadCrumbNode.ChildNodes collection.

You can use the built-in Breadcrumb Editor history to navigate back and forth through history items. To do this, use BreadCrumbEdit.GoBack and BreadCrumbEdit.GoForward methods.

Read the following topic for additional information: Breadcrumb Edit Control.

#Example

The following example implements forward and backward navigation through history in the Breadcrumb editor:

using System;

namespace DXApplication {
    public partial class Form1 : DevExpress.XtraEditors.XtraForm {
        public Form1() {
            InitializeComponent();
            UpdateButtonStates();
            breadCrumbEdit1.SelectedNodeChanged += BreadCrumbEdit1_SelectedNodeChanged;
        }

        void BreadCrumbEdit1_SelectedNodeChanged(object sender, DevExpress.XtraEditors.BreadCrumbSelectedNodeChangedEventArgs e) {
            UpdateButtonStates();
        }

        void buttonBack_Click(object sender, EventArgs e) {
            breadCrumbEdit1.GoBack();
        }

        void buttonForward_Click(object sender, EventArgs e) {
            breadCrumbEdit1.GoForward();
        }

        void buttonUp_Click(object sender, EventArgs e) {
            breadCrumbEdit1.GoUp();
        }
        void UpdateButtonStates() {
            buttonBack.Enabled = breadCrumbEdit1.CanGoBack;
            buttonForward.Enabled = breadCrumbEdit1.CanGoForward;
            buttonUp.Enabled = breadCrumbEdit1.CanGoUp;
        }
    }
}
See Also