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

Grid Error Handler not being triggered.

3 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shauna
Top achievements
Rank 1
Shauna asked on 14 Jan 2014, 04:50 PM
I am using the Telerik Grid's, with MVC3. These grid allow you to specify a error
event handler in case of an error. When a redirect occurs, after the session timeouts, this
function is not triggered, even though the redirect response is not in Json format.

  .Events(events => events.Error("error_handler"))

Note: error_handler is a js function which is not triggered.

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 16 Jan 2014, 08:25 AM
Hi Shauna,

Current behavior is expected as the Grid is not aware of that the session is expired and the page is redirected - that why the desired behavior require custom solution (which is out of scope of our support service). 

Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shauna
Top achievements
Rank 1
answered on 16 Jan 2014, 02:23 PM
A non Json response should trigger the events.Error correct? The grid should error when the response is not in the correct/expect form of Json.

The problem is that the grid cannot parse the response, but instead of triggering the events.Error function, it does nothing. I doubt this is expected behavior.
0
Vladimir Iliev
Telerik team
answered on 20 Jan 2014, 01:34 PM
Hi Shauna,

Basically it depends on your current implementation, however with the default settings if Ajax request call given controller Action and the session is expired, the action will try to redirect to the "login" page. That redirect will not be considered as "error". More information on the matter can be found in the following StackOverflow thread:

Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Shauna
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Shauna
Top achievements
Rank 1
Share this question
or