Hi,
I have a RadCombo with the following event : OnClientSelectedIndexChanging which contains a call to a web service which returns a value. Depending on the value I may need to cancel the change. I have a callback function attached to the webservice.
How would I going about cancelling the change if I needed to?
Thanks
5 Answers, 1 is accepted
You can try cancelling the OnClientSelectedIndexChanging event in this way:
function
OnClientSelectedIndexChangingHandler(sender, eventArgs)
{
var
value =
"web_service_Result"
;
if
(value !=
"web_service_Result"
)
eventArgs.set_cancel(
false
)
else
eventArgs.set_cancel(
true
);
}
More details about OnClientSelectedIndexChanging event you can find at this help article.
Best wishes,
Kalina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

I'm using a Callback function to get the return value from my webservice like so:
function OnClientSelectedIndexChanging(sender, eventArgs)
{
WebServiceRoot.CheckInterval(<%=ID %>, item.get_text(), CallbackInternalCheck);
if
(window.intervalcheck)
{
alert(
'|1:'
+ window.intervalcheck);
eventArgs.set_cancel(
false
)
}
else
{
alert(
'|2:'
+ window.intervalcheck);
eventArgs.set_cancel(
true
);
}
}
var intervalcheck;
function CallbackInternalCheck(result) {
intervalcheck = result;
}
Thanks
Could you verify, if the callback function is executed, because if the "
intervalcheck
" variable is undefined then you are not assigning any value to it. On how to call a callback function, please refer to the following threads here and here.
Regards,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

I've put and alert(result) and it brings back a value. When I assigned it to internalcheck and try and access it within the OnClientSelectedIndexChanging it becomes undefined. I can get the value from internalcheck else where but but not in OnClientSelectedIndexChanging.
Thanks
In order to investigate the cause of this issue, please open a support ticket and provide us with runnable version of your project in order to test it locally.
Greetings,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.