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

Disabling RadWindow using .Enabled property is not worked

2 Answers 60 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hadi Teo
Top achievements
Rank 1
Hadi Teo asked on 21 May 2009, 07:02 AM
Hi,

i have an <input type = "button" id = "btnId" /> and a RadWindow object is set to .OpenerElementID property has been set to "btnId".

I am trying to configure the radWindowInstance using .Enabled property by setting it to false, but it still can open the RadWindow. May i know what is the correct property to disable it ?

Regards,

hadi teo

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 May 2009, 07:37 AM

Hi Had,

I guess you are trying to confugure the RadWindow from code behind (based on condition) whether the window should be shown or not  onclicking the html input button. One suggestion to achieve this, would be setting the OpenerElementID to null for not showing the RadWindow on clicking button.

ASPX:

 
<telerik:RadWindowManager ID="RadWindowManager2" runat="server">    
     <Windows> 
        <telerik:RadWindow  runat="server" ID="Win1"  OpenerElementID="Button2" NavigateUrl="Window.aspx">  
        </telerik:RadWindow> 
     </Windows> 
</telerik:RadWindowManager> 
<input id="Button2" type="button" value="Open Window" /> 
<asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="Show/Not Show" /> 

CS:

 
protected void Button5_Click(object sender, EventArgs e)  
{  
    if(condition) // Checking condition  
    {  
        RadWindowManager2.Windows[0].OpenerElementID = null;  
    }  
    else 
    {  
        RadWindowManager2.Windows[0].OpenerElementID = "Button2";  
    }  

Thanks,
Princy.

0
Hadi Teo
Top achievements
Rank 1
answered on 21 May 2009, 09:22 AM
Hi Princy,

Thanks for your help. Unfortunately i have tried to set the value to null but it's still can be clicked and can open the new RadWindow. Maybe you have any other alternatives ?

Regards,

hadi teo
Tags
Window
Asked by
Hadi Teo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Hadi Teo
Top achievements
Rank 1
Share this question
or