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

RadConfirm is not closed after postback

1 Answer 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
bharat veer
Top achievements
Rank 1
bharat veer asked on 23 May 2011, 08:16 PM
function rbReturnToData_Confim(arg) {
    var button = document.getElementById("<%= RadBtn1.ClientID %>");
    if (arg) {
        button.set_commandName('Apply')
        button.set_autoPostBack(true);
   
}
    else {
        button.set_commandName('Cancel')
        button.set_autoPostBack(true);
    }
}
 
//This method is fired on the ClientClicked event of the Rad Button object. after that server side code is fired
function rbReturnToData_Clicked(button, args) {
    debugger;
    var pending = document.getElementById("<%= lblChangesPending.ClientID %>");
    var lblTitleFilter = document.getElementById("<%= lblTitleFilter.ClientID %>");
    var rfGridFilter = document.getElementById("<%= rfGridFilter.ClientID %>");
 
    if (pending != null && pending.innerHTML != "") {
 
        radconfirm("You have pending filter changes.  Apply them?", rbReturnToData_Confim);
    }
 
    else {
        CollapseToolsPane();
    }
}

Protected void Click(Object Sender,EventArgs e)
{
//Server side code is fired successfully
}
Problem is that code is fired successfully when OK and cancel button is clicked
on the rad confirm window.
Note-  My page is ajexified , full post back is not done because radajaxmanager, radloadingpanel are on the page.
problem is that after serverside code radconfirm box is not closed.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 May 2011, 06:49 AM
Hello Bharat,

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 to the following code library submission inorder to allow the radconfirm window to simulate the blocking of the execution thread while waiting for user's confirmation:
Block the execution thread with radconfirm.

Thanks,
Shinu.
Tags
General Discussions
Asked by
bharat veer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or