Skip to main content

ASPxNavBar.ExpandButtonPosition Property

Gets or sets a value that specifies the position at which the expand button is displayed within all the groups of NavBar.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public ExpandButtonPosition ExpandButtonPosition { get; set; }

Property Value

Type Default Description
ExpandButtonPosition Default

One of the ExpandButtonPosition values.

Available values:

Name Description

For a group, indicates that the expand button position depends upon the navbar level’s ASPxNavBar.ExpandButtonPosition property setting. For a navbar, corresponds to the ExpandButtonPosition.Right value.


The expand button is displayed at the left of a group’s header.


The expand button is displayed at the right of a group’s header.


Use the ExpandButtonPosition property to control the position of the expand button within the navbar’s groups. This property’s value is applicable to all the groups of the navbar control. A particular group’s expand button position can be specified via the group’s NavBarGroup.ExpandButtonPosition property which overrides the value assigned to the ExpandButtonPosition property.


The example demonstrates how to create the ASPxNavBar groups and items at runtime to create a FAQ page.

Data can be obtained from any type of a datasource. For example, the data can be obtained from the Access database file using the OLE DB provider.The sample was built from the kindly provided How to use the ASPxNavBar with an Access or SQL datasource suggestion article, containing the URL to the tutorial video file.

View Example

<html xmlns="">
<head id="Head1" runat="server">
    <title>How to create the FAQ Page using the ASPxNavBar</title>
    <style type="text/css">
        .heading {
            font-size: large;
            color: Blue;

        .Question {
            color: Gray;
            font-size: 11pt;

            .Question img {
                vertical-align: middle;

            .Question span {
                vertical-align: middle !important;

        .Answer {
            font-size: 11pt;
            padding-left: 35px !important;
            padding-top: 8px;
            padding-bottom: 8px;

        .defaultStyle {
            padding-left: 0px;
            list-style-type: none;
            margin: 0px;
        .groupPadding {
    <form id="form1" runat="server">
        <div style="min-height: 500px;">
            <div class="heading">
                Frequently Asked Questions
            <div style="padding-left: 10px; padding-top: 10px;">
                <dx:ASPxNavBar ID="navFAQ" runat="server" ExpandButtonPosition="Left"
                    AutoCollapse="True" GroupSpacing="5px" EncodeHtml="False" CssPostfix="None" CssClass="defaultStyle">
                    <GroupHeaderStyle CssClass="Question" ImageSpacing="8px">
                    <CollapseImage Url="~/Images/nbCollapse.png">
                    <ExpandImage Url="~/Images/nbExpand.png">
                    <ItemStyle CssClass="Answer defaultStyle" />
                    <GroupContentStyle CssClass="groupPadding"></GroupContentStyle>
using System;
using System.Configuration;
using System.Data.OleDb;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, System.EventArgs e) {
        if (!IsPostBack) {

    public void Load_FAQ() {
        string SQL = "SELECT [Sort], [Question], [Answer] FROM [FAQ] ORDER BY [Sort], [Question]";
        string Question = null;
        string Answer = null;
        int i = 0;
        OleDbConnection conn = new OleDbConnection(ConfigurationManager.ConnectionStrings["DB_Conn_FAQ"].ConnectionString);
        OleDbCommand SelectCommand = new OleDbCommand(SQL, conn);
        try {
            OleDbDataReader Reader = SelectCommand.ExecuteReader();
            while (Reader.Read()) {
                if (Reader.HasRows) {
                    Question = Reader["Question"].ToString();
                    Answer = Reader["Answer"].ToString();
                i += 1;
        } catch (Exception ex) {
        } finally {
See Also