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

RadWindow opened with <asp:Button> but NOT OPENED with <telerik:RadToolBarbutton>. Why?

3 Answers 53 Views
Window
This is a migrated thread and some comments may be shown as answers.
Giulio
Top achievements
Rank 1
Giulio asked on 27 Jul 2009, 08:32 AM
Hi all, I have in the same page.aspx a RadToolBar with its RadToolBarButton and a simple <asp:Button>.
In this page I have also a simple RadWindow so defined:
<telerik:RadWindowManager ID="RadWinMngr" runat="server"
    <Windows> 
        <telerik:RadWindow ID="RadWindowAddUser" runat="server" NavigateUrl="http://www.google.com" VisibleOnPageLoad="true" Visible="false" /> 
    </Windows> 
</telerik:RadWindowManager>   


In the code behind, for the simple <asp:Button> I have:

Private Sub Button1_click(...) 
    RadWindowAddUser.Visible = True 
End Sub 


and for the RadToolBarButton I have:
 
Private Sub AddUser() 
    RadWindowAddUser.Visible = True 
End Sub 


I'm sure that the AddUser sub is correctly called because I've verified it by debug breakpoint.

The problem is that when I click on <asp:Button> the RadWindowAddUser is shown correctly, but when I click on RadToolBarButto it doesn't!
Why???

Anybody can help me? Thanks.

Giulio Ferri

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 27 Jul 2009, 12:48 PM
Hi Giulio,

This setup (VisibleOnPageLoad=true Visible=false) will produce an error - by design a RadWindow will always be invisible on the page unless it is called by its server-side API (VisibleOnPageLoad=true) or the client-side one (radopen(), show(), etc.).
What I suggest is not to set the Visible property - leave it to its default value (true) and when you want to open the window, just set its VisibleOnPageLoad property to true. If you still experience problems after that, please open a support ticket and send us a sample project that reproduces your exact setup so we could check it.


Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
mark baer
Top achievements
Rank 1
answered on 25 Mar 2011, 09:43 PM
I don't know if my problem is similar or not, but I am just trying to get a radwindow to display in the center when a button is clicked.  It just has html inside of it.  I tried changing the Visibility=true and visibleonpageload=true, but it just won't display.  I've listed my html below. I am probably doing something stupid, but I'm not sure what.  

thanks for the help.
 
<telerik:RadWindow ID="radWinAddCredit" runat="server" Modal="true" <br>                                        AutoSize="true" Title="Add/Edit Credit" Visible="false" <br>                                        VisibleOnPageLoad="false" Skin="WebBlue" Height="300px" <br>                                        KeepInScreenBounds="True" Left="300px" Overlay="True" <br>                                        ShowContentDuringLoad="False" Top="300px" Width="300px"><br>                                        <ContentTemplate><br>                                            <table class="form"><br>                                                <tr><br>                                                    <td class="formHeader"><br>                                                        Add Credit<br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td class="formLabel" align="left"><br>                                                        Craft<br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td align="left"><br>                                                        <telerik:RadComboBox ID="cboCrafts" ZIndex="100" MarkFirstMatch="true" runat="server"><br>                                                        </telerik:RadComboBox><br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td class="formLabel" align="left"><br>                                                        Title<br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td align="left"><br>                                                        <telerik:RadComboBox ID="cboShowTitles" ZIndex="100" MarkFirstMatch="true" runat="server"><br>                                                            <WebServiceSettings Method="GetShowTitles" Path="../Admin/Controls/AdminService.asmx" /><br>                                                        </telerik:RadComboBox><br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td class="formLabel" align="left"><br>                                                        Comment<br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td align="left"><br>                                                        <asp:TextBox ID="txtCreditComment" runat="server" Width="195"></asp:TextBox><br>                                                    </td><br>                                                </tr><br>                                                <tr><br>                                                    <td align="right"><br>                                                        <asp:Button ID="btnAddCredit" runat="server" OnClick="btnAddCredit_Click" Text="Add" /><br>                                                        <asp:Button ID="btnCancelPopup" runat="server" Text="Cancel" /><br>                                                    </td><br>                                                </tr><br>                                            </table><br>                                        </ContentTemplate><br>                                    </telerik:RadWindow>
0
Georgi Tunev
Telerik team
answered on 28 Mar 2011, 04:40 PM
Hello Mark,

I see in your code that you have set Visible=false. This way the control will not be rendered at all on the page, so you can't use it - this is valid for any ASP.NET control. If you set Visible=True, you should be able to open the RadWindow. I don't see on which event exactly you are trying to open it (client or server side), but I believe that the following help articles will be useful:
http://www.telerik.com/help/aspnet-ajax/window-setting-server-side-properties.html
http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html

If you still experience problems after that, it would be best to open a support ticket and to send us a small sample project that shows your exact setup, so we can provide you a reply based on your exact code.


Greetings,
Georgi Tunev
the Telerik team
Tags
Window
Asked by
Giulio
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
mark baer
Top achievements
Rank 1
Share this question
or