Since we updated our RadControls to the latest version, we noticed the clientside set_autoPostBack functionality has changed.
If you want a confirmation from the user before the button is posted, we set the autopostback to false. Once all is confirmed we put it back on true.
Like:
When you confirm, the button doesn't get postbacked.
Introducing a var with the confirmvalue will work, but why is this ?
Our previous Telerik Version was 2013.1.504.40
Thanks in advance
If you want a confirmation from the user before the button is posted, we set the autopostback to false. Once all is confirmed we put it back on true.
Like:
<
head
runat
=
"server"
>
<
script
>
function ConfirmButton(button, args) {
button.set_autoPostBack(false);
if( confirm('Are you sure?'))
button.set_autoPostBack(true);
}
</
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:radscriptmanager
runat
=
"server"
/>
<
asp:Literal
runat
=
"server"
ID
=
"ltStatus"
/><
br
/>
<
telerik:radbutton
id
=
"btnCredit"
runat
=
"server"
text
=
"DoPostback?"
onclientclicked
=
"ConfirmButton"
onclick
=
"btnCredit_OnClick"
/>
</
form
>
</
body
>
When you confirm, the button doesn't get postbacked.
Introducing a var with the confirmvalue will work, but why is this ?
<script>
function
ConfirmButton(button, args) {
var
setPostback =
false
;
if
(confirm(
'Are you sure?'
))
setPostback =
true
;
button.set_autoPostBack(setPostback);
}
</script>
Our previous Telerik Version was 2013.1.504.40
Thanks in advance