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

Open custom dialog from RadWindow

1 Answer 195 Views
Window
This is a migrated thread and some comments may be shown as answers.
Petr
Top achievements
Rank 1
Iron
Petr asked on 01 Mar 2016, 12:38 PM
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

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 04 Mar 2016, 07:16 AM
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
Tags
Window
Asked by
Petr
Top achievements
Rank 1
Iron
Answers by
Eyup
Telerik team
Share this question
or