I have a page with several GridViews using REST API. When I use POST method, all GridViews are automatically refreshed. I want to update just one of them. According to the docs it should work this way - I use the same URL for GET and POST. Is there a way how to refresh just one GridView or disable automatic refresh and do it manual?
Asked
Active
Viewed 142 times
1
-
It seems that we forgot to include a configuration option to disable the automatic update. I have filed [a new issue](https://github.com/riganti/dotvvm/issues/662), we'll answer this question when we make that option. – exyi Jan 23 '19 at 11:52
-
If you are however looking for a dirty workaround, the automatic refreshes are handled by [EventHub class in dotvvm.eventHub](https://github.com/riganti/dotvvm/blob/master/src/DotVVM.Framework/Resources/Scripts/DotVVM.Api.ts#L13). As it's a Javascript class, you can replace these function by simply assigning to them by a custom function that will suppress these events. The events are called something like "_myApi.myEndpoint". – exyi Jan 23 '19 at 11:55
-
I've replaced notify function in dotvvm.eventHub with a custom function that doesn't handle "dotvvm.api._myApi" and it doesn't do automatic refreshes any more. Thank you! – JonV Jan 24 '19 at 20:41