Ticket T302707
Visible to All Users

How to select the first item when a group is clicked

created 9 years ago

Hi DevExpress Team,

I have a problem with NavBarGroup Item cursor position

NavBar Setting:

LinkSelectionMode = OneInControl

example:
I have a NavBar with 9 Groups
In NavBarGroup (A) are 4 NavBarItem
In NavBarGroup (B) are 11 NavBarItem
I click in NavBarGroup (B) on NavBarItem 11 - is now active
Now, I click on NavBarGroup (A) and the cursor is Bottom (in space)!

My question:
Change NavBarGroup, how can I move the cursor (without many code) set on NavBarItem = 0 (Top)

Regards
Peter

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hi,

If you wish to select the first item when a group header is clicked, handle the NavBarControl.ActiveGroupChanged event and set the e.Group.SelectedLinkIndex property to 0 in this event handler. Please note that this event is not supported in ExplorerBar Views.

Let me know your results once you try this approach.

    Comments (1)
    DevExpress Support Team 9 years ago

      POSTED by Claus-Peter Trodler:

      Fine, thanks.
      Have a nice day
      peter

      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.