问题
I've been put on a project for work where they use devexpress. For my task I'm trying to run a javascript function when an ajax call is successful, however I don't know where to put the onsuccess parameter.
I know how to do this for ajax.beginform but for devexpress theres a grid view with a bunch of settings.stuff. Any idea where this goes?
I see a settings.CallBackRouteValues, is this where that goes?
回答1:
If you need to handle on a client when DevExpress controls finish their callbacks, handle the ASPxClientGlobalEvents.EndCallback event. To access this event, add the ASPxGlobalEvents component onto a form and use its ClientSideEvents.
If you use MVC, there is the MVCxClientGlobalEvents class which is an analog of ASPxClientGlobalEvents.
The CallBackRouteValues property specifies to what controller action method a callback will be sent.
来源:https://stackoverflow.com/questions/28633623/devexpress-onsuccess-parameter