Ticket T1284794
Visible to All Users

Blazor Menu

created 4 days ago (modified 4 days ago)

Hello!

Is it possible to create nav menu with more then one column of items?

SubmenuItems.png

I tried with row and col but it didn't work,

C#
<DxMenu CollapseItemsToHamburgerMenu="true"> <Items> <DxMenuItem Text="Domov" NavigateUrl="/" /> <DxMenuItem Text="Vrtni center" IconCssClass="menu-icon-home menu-icon"> <Items> <div class="row"> <div class="col"> <DxMenuItem Text="Our Mission" /> <DxMenuItem Text="Our Customers" /> </div> <div class="col"> <DxMenuItem Text="Our " /> <DxMenuItem Text="Our " /> </div> <div class="col"> <DxMenuItem Text=" Mission" /> <DxMenuItem Text=" Customers" /> </div> </div> </Items> </DxMenuItem> </Items> </DxMenu>

Thank you, Matjaz

Answers approved by DevExpress Support

created 2 days ago

Hi,

To display multiple columns of items in a DxMenuItem dropdown, you can use the DxMenuItem SubMenuTemplate property. You can use the DxGridLayout component inside the template to arrange the menu items in multiple columns.

Razor
<DxMenu CollapseItemsToHamburgerMenu="true"> <Items> <DxMenuItem Text="Domov" NavigateUrl="/" /> <DxMenuItem Text="Vrtni center" IconCssClass="menu-icon-home menu-icon"> <SubMenuTemplate> <DxGridLayout> <Rows> <DxGridLayoutRow></DxGridLayoutRow> </Rows> <Columns> <DxGridLayoutColumn Width="120px"></DxGridLayoutColumn> <DxGridLayoutColumn Width="100px"></DxGridLayoutColumn> <DxGridLayoutColumn Width="100px"></DxGridLayoutColumn> </Columns> <Items> <DxGridLayoutItem Row="0" Column="0"> <Template> <DxMenu Orientation="Orientation.Vertical"> <Items> <DxMenuItem Text="Our Mission" /> <DxMenuItem Text="Our Customers" /> </Items> </DxMenu> </Template> </DxGridLayoutItem> <DxGridLayoutItem Row="0" Column="1"> <Template> <DxMenu Orientation="Orientation.Vertical"> <Items> <DxMenuItem Text="Our " /> <DxMenuItem Text="Our " /> </Items> </DxMenu> </Template> </DxGridLayoutItem> <DxGridLayoutItem Row="0" Column="2"> <Template> <DxMenu Orientation="Orientation.Vertical"> <Items> <DxMenuItem Text="Our " /> <DxMenuItem Text="Our " /> </Items> </DxMenu> </Template> </DxGridLayoutItem> </Items> </DxGridLayout> </SubMenuTemplate> </DxMenuItem> </Items> </DxMenu>

Clipboard-File-1.png

Let me know if you need further assistance.

Regards,
Gian

    Comments (2)
    MR MR
    Matjaz Reberc 2 days ago

      Hello Gian!

      Thank you for your help,

      I am new to DevExpress.

      I now have to figure out how to change layout on mobile screen.

      Thank you, Matjaz

      GP GP
      Gian Pascual (DevExpress Support) a day ago

        You are welcome.

        If you need further assistance, feel free to contact us.

        Regards,
        Gian

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.