This is a migrated thread and some comments may be shown as answers.

Menuitem selected persistent with highlightPath

1 Answer 80 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Phanis
Top achievements
Rank 1
Phanis asked on 26 Jan 2011, 03:34 PM
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.

1 Answer, 1 is accepted

Sort by
0
Phanis
Top achievements
Rank 1
answered on 26 Jan 2011, 03:51 PM
Ok, I changed the method and now it seems to work.
I Use Selected = true instead of HighlightPath().

Sorry for the noise.

Julien
Tags
Menu
Asked by
Phanis
Top achievements
Rank 1
Answers by
Phanis
Top achievements
Rank 1
Share this question
or