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">
                        <p style="text-align: center;">
                         <telerik:RadGrid ID="RGrid" runat="server" AllowPaging="true" AllowSorting="true" OnNeedDataSource="RGrid_NeedDataSource">
                         <MasterTableView AutoGenerateColumns="true"></MasterTableView>
    <telerik:RadCodeBlock runat="server" ID="rdbScripts">
              <script type="text/javascript">
                  function showDialogInitially() {
                      var wnd = $find("<%=modalPopup.ClientID %>");
                   //   Sys.Application.remove_load(showDialogInitially);
    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
    Marin Bratanov avatar
    3907 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:
    - 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.

    Marin Bratanov
    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. Arsalan
    Arsalan avatar
    17 posts
    Member since:
    Sep 2013

    Posted 25 Jan 2014 Link to this post

    Thanks Marin Bratanov
Back to Top