New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientItemsRequestFailed
The OnClientItemsRequestFailed client-side event occurs when an error has occurred while loading elements using the load-on-demand mechanism.
The event handler receives two parameters:
-
The instance of the listbox firing the event.
-
An eventArgs parameter containing the following methods:
-
get_errorMessage returns the error message.
-
set_cancel lets you prevent the default error message from displaying.
You can use this event to display the default error message, or to cancel the event, in order to display a custom error message.
JavaScript
<script type="text/javascript">
function OnClientItemsRequestFailed(sender, eventArgs) {
alert(eventArgs.get_errorMessage());
}
</script>