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

Problem with migrating from AJAX for ASP.NET to Ajax for ASP.NET Ajax

3 Answers 76 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
W Klijnsmit
Top achievements
Rank 1
W Klijnsmit asked on 23 Sep 2008, 01:46 PM
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.
        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.

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 24 Sep 2008, 10:52 AM
Hi W Klijnsmit,

We already answered to your support ticket.

Please review the provide response and let us know if further questions arise.

Kind regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Maria Ilieva
Telerik team
answered on 24 Sep 2008, 11:12 AM
Hi W Klijnsmit,

We already reply to your support ticket.
 
Here is our answer:

"Currently the proposal in this forum post, is the only possible solution.

As you know the latest RadAjaxControls are build on the top of MS AJAX and this functionality could not be implemented due the way MS AJAX works.
Currently, canceling the creation of particular settings on AjaxSettingCreating event stays the only possible option for workaround"


Let us know if further questions arise.

All the best,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
W Klijnsmit
Top achievements
Rank 1
answered on 25 Sep 2008, 09:41 AM
thank you for the info, we'll find an other way :)
Tags
Ajax
Asked by
W Klijnsmit
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
W Klijnsmit
Top achievements
Rank 1
Share this question
or