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

[Solved] client api onsuccess?

2 Answers 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
huanaku
Top achievements
Rank 1
huanaku asked on 21 Sep 2011, 04:22 PM
I'm using an ajax bound grid and would like to execute a javascript function upon completion of the post, similar to an AjaxOptions OnSuccess or OnFailure callback.  I don't see anything in the client api that works quite like that -- OnSave is called before the post and OnDataBound seems to be called each time the grid is bound, which I want to avoid if possible. 

Any suggestions or pointers?  

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 22 Sep 2011, 09:22 AM
Hello Huanaku,

Indeed, the Grid does not provide the exact event that you need. How about using a combination of OnSave and OnDataBound - you can raise some flag (a global JS variable) in OnSave and then check for it in OnDataBound. You can event store some additional information in the OnSave handler, and later display it in the OnDataBound handler.

Best wishes,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
huanaku
Top achievements
Rank 1
answered on 23 Sep 2011, 03:08 PM
Thanks for the reply, Dimo.  I'll take that approach.
Tags
Grid
Asked by
huanaku
Top achievements
Rank 1
Answers by
Dimo
Telerik team
huanaku
Top achievements
Rank 1
Share this question
or