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

how to fire radwindow button click

1 Answer 60 Views
Window
This is a migrated thread and some comments may be shown as answers.
Saadettin
Top achievements
Rank 1
Saadettin asked on 07 Jan 2014, 10:40 AM
Hi. I use radwindow for delete process confirmation. My code like below:

<telerik:RadWindowManager runat="server" ID="RadWindowManager1" OnClientCommand="">
          <ConfirmTemplate>
            <div>
              <h3>Kayıt Silme Onayı</h3>
                <label style="margin:10px 0 10px 0;display:block;margin:20px;">Kaydı Silmek İstediğinize Emin misiniz ?</label>
              <div style="float:right;">
                <asp:Button ID="btnYes" runat="server" Text="Evet" CssClass="button ino-button-edit" OnClick="btnYes_Clcik" />
                <asp:Button ID="btnNo" runat="server" Text="Hayır" CssClass="button ino-button-delete-red" />
              </div>
              <div style="clear:both;"></div>
            </div>
          </ConfirmTemplate>
       </telerik:RadWindowManager>

When I click yes button I want delete the record. But yes button click does not fire. How can I achieve this.Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Jan 2014, 12:48 PM
Hello Saadettin,

Server controls cannot be used in the templates, because when a RadConfirm/RadAlert/RadPrompt dialog is opened this template is cloned via JavaScript, so server controls will stop working.

What you can do is to initiate a postback from the callback function that will finish the job. Examples are available here: http://www.telerik.com/help/aspnet-ajax/window-using-radconfirm-in-server-code.html.
You may also find useful this article that explains the basics of the RadConfirm dialog: http://www.telerik.com/help/aspnet-ajax/window-dialogs-confirm.html.


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.
Tags
Window
Asked by
Saadettin
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or