I’m upgrading our solution from the classic controls to the Ajax.Net controls and have a problem with the following scenario:
On one page, I have several user controls which each have a grid that I want to refresh individually, from a js call.
With the old controls, I would just enable Ajax for the grid and then do Ajax requests like this
Now, I only have one Ajax manager, so in the user control I get a reference and then subscribe to the AjaxRequest event. To get the grid to refresh I have to add ajax settings.
|RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
|manager.AjaxRequest += manager_AjaxRequest;
This works fine, in the manager_AjaxRequest function I check the argument and only do something if it is the right request.
But since I added the grid to the AjaxSettings it will get updated on the client every time, even if it doesn’t have to. So if I only want grid A to upgrade how do I prevent Grid B from updating as well? Both subscribe to the same AjaxRequest event and both need to have AjaxSettings.
A workout I found is using a hidden button and then using the ajaxRequestWithTarget to pretend the button was causing the update, but there must be a better way to do it.
Any help on this would be appreciated.