Open custom dialog from RadWindow

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

    Posted 01 Mar 2016 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" >
        <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" DestroyOnClose="false" ViewStateMode="Disabled" KeepInScreenBounds="true"
          VisibleStatusbar="false"  Modal="True"  >
        <telerik:RadWindow ID="DialogDeleteConfirm" runat="server" Width="450px" Height="120px" Modal="true">
              <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;" />

    According another discussion I simply replace my existing code 

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


     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,

  2. Eyup
    Eyup avatar
    3940 posts

    Posted 04 Mar 2016 Link to this post

    Hello Petr,

    You can try to use the RegisterStartupScript method to achieve this requirement:

    Also, you can examine the samples provided in the following post:

    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
Back to Top