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

disable ContextMenu in dynamic generated RadWindow

2 Answers 54 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 07 Oct 2009, 07:44 PM
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 Answers, 1 is accepted

Sort by
0
Stefan
Top achievements
Rank 1
answered on 08 Oct 2009, 04:52 PM
no ideas?
0
Fiko
Telerik team
answered on 13 Oct 2009, 12:28 PM
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.
Tags
Window
Asked by
Stefan
Top achievements
Rank 1
Answers by
Stefan
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or