Open custom dialog from RadWindow

2 posts, 0 answers
  1. Petr
    Petr avatar
    18 posts
    Member since:
    Jul 2015

    Posted 01 Mar Link to this post

    Hi all,

    I have an editable grid. When row is edited new RadWindow is opened. User can make some changes and after pressing save some serve-side code is executed. When specific conditions are met I want user response to continue correctly. I am using RadWindowManager and method RadConfirm for user response. It worked fine, but I need more possibilities now and I want to put 4 buttons instead of Ok/Cancel.

    So I created new window DialogDeleteConfirm  on my page 

    <telerik:RadWindowManager ID="radWindowManager1" runat="server" ViewStateMode="Disabled" >
      <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" DestroyOnClose="false" ViewStateMode="Disabled" KeepInScreenBounds="true"
          VisibleStatusbar="false"  Modal="True"  >
        </telerik:RadWindow>
        <telerik:RadWindow ID="DialogDeleteConfirm" runat="server" Width="450px" Height="120px" Modal="true">
            <ContentTemplate>
              <div style="padding: 10px; text-align: center;">
                <p style="text-align: center;">Do you want to delete items automatically?</p>
                <asp:Button ID="btnOk" runat="server" OnClientClick="returnArg('O'); return false;" />
                <asp:Button ID="btnSelection" runat="server" OnClientClick="returnArg('S'); return false;" />
                <asp:Button ID="btnKeepAll" runat="server" OnClientClick="returnArg('K'); return false;" />
                <asp:Button ID="btnCancel" runat="server" OnClientClick="returnArg('C'); return false;" />
              </div>
            </ContentTemplate>
        </telerik:RadWindow>
      </Windows>
    </telerik:RadWindowManager>




    According another discussion I simply replace my existing code 

    radWindowManager1.RadConfirm(messageToUser, "autoDeleteCallback", 450, 120, null, "");

    by 

     DialogDeleteConfirm.VisibleOnPageLoad = true;

    But it doesn't work and no window is displayed. Unfortunately there is no method in RadWindowManager to open window.

    Can you help me how to open new window immediately?

    Thanks a lot,
    Petr

  2. Eyup
    Admin
    Eyup avatar
    3007 posts

    Posted 04 Mar Link to this post

    Hello Petr,

    You can try to use the RegisterStartupScript method to achieve this requirement:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/opening-from-the-server

    Also, you can examine the samples provided in the following post:
    http://www.telerik.com/forums/context-menu---open-a-pop-up#Qe9fJgzWrE2DhYPWX7OkCQ

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top