disable ContextMenu in dynamic generated RadWindow

3 posts, 0 answers
  1. Stefan
    Stefan avatar
    2 posts
    Member since:
    Mar 2009

    Posted 07 Oct 2009 Link to this post

    Hello,

    I've a problem by diasable ContextMenu in a dynamic generated RadWindow.
    Here is my Code:

    function OnClientFileOpen(sender, args)  
                {  
                   var item = args.get_item();  
                   if (item && !item.isDirectory())  
                   {  
                        var image = new Image();  
                        image.src = item.get_url();                      
                        var oWnd = $find("<%= RadWindow1.ClientID %>");  
                        oWnd.setUrl(item.get_url());  
                        oWnd.set_width(image.width + 37);  
                        oWnd.set_height(image.height + 70);  
                        oWnd.show();  
                        image.onContextMenu = 'return(false)';  
                   }  
                }  

    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" 
                    Height="487px" Width="450px" EnableOpenFile="false" OnClientFileOpen="OnClientFileOpen" 
                    OnClientItemSelected="OnClientItemSelected" Skin="Black"   
                    EnableCreateNewFolder="False" EnableTheming="False" EnableViewState="False"   
                    VisibleControls="TreeView, Grid, Toolbar">  
                <Configuration SearchPatterns="*.jpg"></Configuration> 
                </telerik:RadFileExplorer> 
                <telerik:RadWindow ID="RadWindow1"  runat="server" Skin="Black" Behavior="Close" VisibleStatusbar="false" > 
                </telerik:RadWindow> 

     


    At the Image in the RadWindow I want to disable Contextmenu.

    Any Ideas?

    Thanks,
    Best Regards

     

     

     

     

     

     

     

     

     

  2. Stefan
    Stefan avatar
    2 posts
    Member since:
    Mar 2009

    Posted 08 Oct 2009 Link to this post

    no ideas?
  3. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 13 Oct 2009 Link to this post

    Hi Stefan,

    The provided code is not enough for us to understand your scenario. I cannot understand where are you using the created image (var image = new Image(); ). Could you please implement the desired behavior by using an IFRAME, open a new support ticket and send me the project? I will rework it and replace the IFRAME with the RadWindow control.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top