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

show hide image on menuitem click

2 Answers 116 Views
Menu
This is a migrated thread and some comments may be shown as answers.
parthavi h
Top achievements
Rank 1
parthavi h asked on 23 Sep 2010, 01:43 PM
Hi,

I have this following heirarchy  of menus
<div style="color:Black">
    <radM:RadMenu ID="RadMenu1" runat="server"  OnClientLoad="onClientLoad" EnableEmbeddedSkins="False"  Skin="Outlook"  
        OnClientItemClosing="onClientItemClosing" EnableRoundedCorners="true" OnItemClick="RadMenu1_ItemClick">
        <Items >
            <radM:RadMenuItem id = "lblWelcome" GroupSettings-Flow="Vertical">
                <Items>
                    <radM:RadMenuItem Text="<%$ Resources:,res:home_login_login_to_factnet%>" ImageUrl="../images/SignOut.gif" />
                    <radM:RadMenuItem id = "RadLanguageOptionMenu" Text="Set my language preference" ImageUrl="../images/MyProfile.gif" />
                        <Items>
                            <radM:RadMenuItem text = "fr-FR" />
                            <radM:RadMenuItem text = "en-US" />
                        </Items>
                    <radM:RadMenuItem Text="My Profile" ImageUrl="../images/MyProfile.gif" GroupSettings-Flow="Vertical" />
                </Items>
            </radM:RadMenuItem>
        </Items>
    </radM:RadMenu>
</div>


Need to show a 'checkmark' image besides the menuitem ('fr-FR' or 'en-US') itself, indicating that particular item is selected ; if the user clicks on 'fr-FR' or 'en-US'. And hide the image if the user clicks on another menu-item (other than the one that is selected)

Kindly assist.

Thanks,
Parthavi

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 28 Sep 2010, 01:57 PM
Hello parthavi,

You can set ImageUrl for the needed item ('fr-FR' or 'en-US') in ItemClick event handler. In order to remove then the image, you should set ImageUrl to an empty string.

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
parthavi h
Top achievements
Rank 1
answered on 18 Oct 2010, 07:15 AM
Yes, Thank you. The ImageURL does work. But the problem here was with the skin that i was using. It was not displaying the image and text on it. It would do so only if we hover over the control (here the list).

I changed the skin. Its working fine now.

Thanks a lot.
Tags
Menu
Asked by
parthavi h
Top achievements
Rank 1
Answers by
Yana
Telerik team
parthavi h
Top achievements
Rank 1
Share this question
or