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

Disable global errorhandling

1 Answer 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andreas Dahlén
Top achievements
Rank 1
Andreas Dahlén asked on 06 May 2015, 12:29 PM

Hi,

How can I disable error to get to the global error handlar, when we define a local error handle for Kendo grid? I've tried to use e.preventDefault(), but it doesn't work.

Global error handling

$(document).ajaxError(function (e, request) {
    setError(request);
});​

 

Example of local error handling

<script>
function onError(e, args) {

    //TODO: Stop error from being propagated to global .ajaxError

    HandleError(e); 
}
</script> 
 
@(Html.Kendo().Grid<Premise>()
    .Name("grdName")

<-- SNIP -->

    .DataSource(ds => ds
        .Ajax()

 <-- SNIP --> 

         .Events(e => e.Error("onError")

))
 

 Any ideas on how to solve it?

 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 08 May 2015, 10:49 AM

Hello Andreas,

It is directly related to the jQuery and the error handling and it could not be disabled. One possible solution would be using a flag variable and change its value in the data source error handler. 

Regards,
Boyan Dimitrov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Andreas Dahlén
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or