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

[Solved] grid.ajaxRequest

2 Answers 142 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 1
Mike asked on 14 Sep 2011, 05:35 PM
In order to drive some dependent tables in my app, I am manually editing the urls stored in the ajax object of the grid and then calling the ajaxRequest method to refresh the table. I couldn't find a way to get rebind to behave the way I wanted but this method seems to be ok. However, sometimes I want to cancel a pending ajaxRequest - for example, if another change means that I need to fire off a new request to rebind the table.

The usual way is to call abort on the XHR object - jQuery kindly provides a nice wrapper of the XHR object when you call it's ajax methods. I've modified the telerik.grid.js to return that object from ajaxRequest and everything seems to work fine. However, I don't like to branch my dependencies this way - one day we will update to the next great telerik library and I don't want to have to remember to make that change.

Does that seem like a safe thing for you to incorporate in the main source code? Is there some reason I'm not thinking of that would make this a bad change, and I should find a different approach?

2 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 21 Sep 2011, 09:14 PM
So, yeah, I'm looking for this answer too....anybody?  To repeat the main question, how do I do something like

grid.getHappyAjaxRequestObject().abortThisThing();


 ?
0
Robert
Top achievements
Rank 1
answered on 22 Sep 2011, 03:35 PM
bumpity bump bump
Tags
General Discussions
Asked by
Mike
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Share this question
or