SetImageUrl does not work for context menu.

3 posts, 0 answers
  1. muhammad
    muhammad avatar
    12 posts
    Member since:
    Sep 2008

    Posted 27 Nov 2008 Link to this post

    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. muhammad
    muhammad avatar
    12 posts
    Member since:
    Sep 2008

    Posted 27 Nov 2008 Link to this post

    Is there any help regarding setting the image url of context menu item ? any idea?
  3. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 28 Nov 2008 Link to this post

    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.
Back to Top