RadConfirm to call Server Side Events

4 posts, 0 answers
  1. Sajeev
    Sajeev avatar
    4 posts
    Member since:
    Oct 2008

    Posted 14 Apr 2009 Link to this post

    Hello,

    I am creating link buttons dynamically and want to call the link button click event after confirming from the user. Curently I have assigned the onClientClick event of the link button to Confirm dialog, and Click event to the link button server side click event. I want to use radConfirm in place of confirm dialog box. Is it possible to use radConfirm for this purpose and how?

    Sajeev
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Apr 2009 Link to this post

    Hi Sajeev,

    Unlike the standard confim(), radconfirm() cannot block the execution of the thread and it needs a CallBackFunction. So once the user confirms the postback, in the radconfirm's CallBackFunction you need to use  __doPostBack to call server side event. I believe the following Code Library will be of help in achieving this functionality;
    Using radconfirm() CallBackFunction to perform a postback.

    You can also refer the following code library,
    Block the execution thread with radconfirm.

    Thanks,
    Princy.
  3. Sajeev
    Sajeev avatar
    4 posts
    Member since:
    Oct 2008

    Posted 15 Apr 2009 Link to this post

    Hello Princy,

    Thanks for the update.
    I went through the following thread which solved my problem:

    http://www.telerik.com/community/forums/aspnet-ajax/window/radconfirm-and-delete.aspx

    Thanks,
    sajeev
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 15 Apr 2009 Link to this post

    Hi Sajeev,

    Unlike the standard confirm dialog, radconfirm() cannot block the execution thread - this is something that cannot be done with JavaScript and that is why a callback function is used. There is a workaround however, that allows the radwindow to mimic the blocking of the thread in certain scenarios only - buttons and links. You can examine the code in the following demo:

    http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx


    Best wishes,
    Georgi Tunev
    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