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

SetImageUrl does not work for context menu.

2 Answers 43 Views
Menu
This is a migrated thread and some comments may be shown as answers.
muhammad
Top achievements
Rank 1
muhammad asked on 27 Nov 2008, 08:01 AM
i have a rad context menu with some items in it.
<telerik:RadContextMenu ID="RadContextMenu1" Runat="server" OnClientItemClicked="ClientItemClicked" >

i want to change the image url when some item is clicked in ClientItemClicked(sender, eventArgs).
but the following code does not work. plz help me setting the image url to null.  I gone through the provided api and help provided as in Add Remove Disable Items on ClientSide, but does not make it work. plz tel if i am doing some thing wrong. alert displays the url properly now i want to disable the url and commit the changes for server side persistance.


function ClientItemClicked(sender, eventArgs) {

                        var item = eventArgs.get_item();
                         alert(" item url is set" + item.get_imageUrl() );

                        item.trackChanges();
                        item.SetText(" some text ");
                        item.SetImageUrl("");
                        item.commitChanges();

                             
                    }

2 Answers, 1 is accepted

Sort by
0
muhammad
Top achievements
Rank 1
answered on 28 Nov 2008, 04:46 AM
Is there any help regarding setting the image url of context menu item ? any idea?
0
Atanas Korchev
Telerik team
answered on 28 Nov 2008, 07:54 AM
Hello muhammad,

None of the client-side methods you are using is supported by the RadMenuItem client-side object. Please check this help topic for additional info.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
muhammad
Top achievements
Rank 1
Answers by
muhammad
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or