Menuitem selected persistent with highlightPath

2 posts, 0 answers
  1. Phanis
    Phanis avatar
    4 posts
    Member since:
    Jun 2012

    Posted 26 Jan 2011 Link to this post

    Hi all,
    I currently have a problem with the use of HighlightPath()
    When I click on a item of my menu, it works good
    When I click on a second item, it highlights too but the first is still highlited.

    Here is a code sample :

    Default.aspx :
    <telerik:RadMenu ID="RadMenuClients" runat="server" >
        <Items>
            <telerik:RadMenuItem Text="Toto" Value="0" />
            <telerik:RadMenuItem Text="Titi" Value="1" />
            <telerik:RadMenuItem Text="Tata" Value="3" />
            <telerik:RadMenuItem Text="Tutu" Value="2" />
            <telerik:RadMenuItem Text="Tete" Value="4" />
        </Items>
    </telerik:RadMenu>

    Default.aspx.vb :
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            'Highliting
            Dim currentItem As RadMenuItem = RadMenuClients.Items.FindItemByValue(Session("idSel"))
            If currentItem IsNot Nothing Then
                currentItem.HighlightPath()
            Else
                RadMenuClients.Items.FindItemByValue(0).HighlightPath()
            End If
    End Sub
     
        Protected Sub RadMenuClients_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenuClients.ItemClick
            Session("idSel") = e.Item.Value
        End Sub

    Can you tell me what is wrong with my code ?

    Thank You

    Julien.
  2. Phanis
    Phanis avatar
    4 posts
    Member since:
    Jun 2012

    Posted 26 Jan 2011 Link to this post

    Ok, I changed the method and now it seems to work.
    I Use Selected = true instead of HighlightPath().

    Sorry for the noise.

    Julien
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top