radConfirm on ToolBar_Click

2 posts, 0 answers
  1. Dominic
    Dominic avatar
    42 posts
    Member since:
    Sep 2008

    Posted 04 Mar 2009 Link to this post


    I'm looking for an example to show a radconfirm to the user after clicking on a toolBar_Button, i've found this thread : http://www.telerik.com/support/kb/aspnet-ajax/window/using-radprompt-and-radconfirm-with-telerik-navigational-controls.aspx
    but my question is, why we cant just use a client side fonction on the OnClientButtonClicking event and like : 


    OnClientButtonClicking="ConfirmData;return false;" and on this function juste make an AjaxRequestWithTarget("<%=ToolBar.ClientID%>") ? If i'm using this approach the postback are not canceled (with the "return false"), and if i'm cancelling the event (eventArgs.set_cancel(true)) the server side event is never raise.  So if someone can give me more informations about this approach, it will be really appreciated !

    Thanks in advance for your help.

  2. Yana
    Yana avatar
    5013 posts

    Posted 05 Mar 2009 Link to this post

    Hello Dominic,

    All client-side methods strictly follow the ASP.NET AJAX conventions and that's why when subscribing to OnClientButtonClicking event , the event handler should take two parameters - sender and eventArgs.

    I couldn't understand why you cannot use args.set_cancel() method to cancel the postback when needed. Please explain in more details your scenario and/or send us a sample code.  Thank you

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top