Whe are migrating to the new "prometheus" ajax manager.
In the old Ajaxmanager we could update controls without knowing which control caused a postback through the ResolveUpdatedControls event.
I've read the documentation and I know the event is removed in the new version.
What I'm trying to accomplish is that I can update parts of the Page without knowing wich control caused the postback. Some parts always need an async refresh and some parts refresh only if the logic of the page decides they have to do so.
This code shows how we are now handling updates in a very flexible way through the ResolveUpdatedControls event. We only had to make sure the control that causes a postback was ajaxified.
I've read the other thread about this problem.
(http://www.telerik.com/community/forums/thread/b311D-bcdtdd.aspx)
It feels wrong to add all posible AjaxSettings for every control that might have to be updated and cancel them all afterwards, accept for the correct ones.
Is there already a better solution for this problem?
Thanks in advance.
In the old Ajaxmanager we could update controls without knowing which control caused a postback through the ResolveUpdatedControls event.
I've read the documentation and I know the event is removed in the new version.
What I'm trying to accomplish is that I can update parts of the Page without knowing wich control caused the postback. Some parts always need an async refresh and some parts refresh only if the logic of the page decides they have to do so.
This code shows how we are now handling updates in a very flexible way through the ResolveUpdatedControls event. We only had to make sure the control that causes a postback was ajaxified.
private void RadAjaxManager1_ResolveUpdatedControls(object sender, UpdatedControlsEventArgs e) |
{ |
foreach (Control ctl in GUIManagement.ResolveUpdateControls) |
{ |
e.UpdatedControls.Add(new AjaxUpdatedControl(ctl.UniqueID,String.Empty)); |
} |
Control _postbackcontrol = Page.FindControl(e.PostBackControlID); |
if (_postbackcontrol == null) |
{ |
e.SuppressError = true; |
} |
GUIManagement.ResolveUpdateControls = new List<Control>(); |
} |
I've read the other thread about this problem.
(http://www.telerik.com/community/forums/thread/b311D-bcdtdd.aspx)
It feels wrong to add all posible AjaxSettings for every control that might have to be updated and cancel them all afterwards, accept for the correct ones.
Is there already a better solution for this problem?
Thanks in advance.