Telerik RadWindow opens only first time after pageload

3 posts, 0 answers
  1. Arsalan
    Arsalan avatar
    17 posts
    Member since:
    Sep 2013

    Posted 15 Jan 2014 Link to this post

    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. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 16 Jan 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Arsalan
    Arsalan avatar
    17 posts
    Member since:
    Sep 2013

    Posted 25 Jan 2014 Link to this post

    Thanks Marin Bratanov
Back to Top