Disable global errorhandling

2 posts, 0 answers
  1. Andreas Dahlén
    Andreas Dahlén avatar
    16 posts
    Member since:
    Mar 2010

    Posted 06 May 2015 Link to this post

    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?

     

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2047 posts

    Posted 08 May 2015 Link to this post

    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.

     
Back to Top