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

Telerik RadWindow opens only first time after pageload

2 Answers 57 Views
Window
This is a migrated thread and some comments may be shown as answers.
Arsalan
Top achievements
Rank 1
Arsalan asked on 15 Jan 2014, 06:44 AM
This is my .aspx code
<telerik:RadWindow  ID="modalPopup" runat="server" Width="360px" Height="360px">
               <ContentTemplate>
                    <p style="text-align: center;">
                     <h3>Data</h3>

                     <telerik:RadGrid ID="RGrid" runat="server" AllowPaging="true" AllowSorting="true" OnNeedDataSource="RGrid_NeedDataSource">
                     <MasterTableView AutoGenerateColumns="true"></MasterTableView>
                     </telerik:RadGrid>    
                    </p>
               </ContentTemplate>
          </telerik:RadWindow>


<telerik:RadCodeBlock runat="server" ID="rdbScripts">
          <script type="text/javascript">

              function showDialogInitially() {
                  //alert("786");

                  var wnd = $find("<%=modalPopup.ClientID %>");
                 wnd.show();

               //   Sys.Application.remove_load(showDialogInitially);
              } 

          </script>
     </telerik:RadCodeBlock>

this is onbuttonclick code

<telerik:RadButton ID="btnPreview" Text="Preview" runat="server" OnClientClicked="showDialogInitially()" />
It is working only first time but as I close the window and press button again It does not open anymore.
i have already tried this code.
<telerik:RadButton ID="btnPreview" Text="Preview" runat="server" OnClientClicked="showDialogInitially" AutoPostBack="false" />
But its does not work

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 16 Jan 2014, 12:22 PM
Hi Arsalan,

There is no reason for this not to work in the attached snippet. I just tried it myself and it worked as expected. You can find attached my test page and a short video from my experiment as a reference.
At this point I can advise the following:
- make sure there are no JavaScript errors on the page
- make sure the function is not called too early from server-side code, as I see remnants of such attempts in it. Examine this article on the matter: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-javascript-from-server-side.html.
- compare your actual setup with mine to find the difference that causes the problem
- if neither helps, post the modifications to my page needed to observe the issue with this page, so I can actually investigate it.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Arsalan
Top achievements
Rank 1
answered on 25 Jan 2014, 06:44 AM
Thanks Marin Bratanov
Tags
Window
Asked by
Arsalan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Arsalan
Top achievements
Rank 1
Share this question
or