Disabling RadWindow using .Enabled property is not worked

3 posts, 0 answers
  1. Hadi Teo
    Hadi Teo avatar
    23 posts
    Member since:
    Jan 2008

    Posted 21 May 2009 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 May 2009 Link to this post

    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.

  3. Hadi Teo
    Hadi Teo avatar
    23 posts
    Member since:
    Jan 2008

    Posted 21 May 2009 Link to this post

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