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

PageViews, UserControls and updating between

4 Answers 65 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
RichJ
Top achievements
Rank 1
RichJ asked on 23 Mar 2012, 12:20 AM
Hi all,

I'm hoping someone can help with a problem I'm having concerning tabstrip, pageviews and ajax updates.

I have a MultiPage in place with several tabs, and each tab relates to a PageView that in turn contains UserControls.
I have a RadAjaxManager on the main page containing these tabs, and I'm also using a RadAjaxManagerProxy control on each of the UserControls.
I need to communicate between two of these pageviews and usercontrols but I'm having a problem with a particular piece of functionality.
To make it easier to understand I have a "Garment" tab/UserControl that allows customisation of a garment.  As a result of changes to the garment, I'd like to update a second tab/pageview ("Branding").  I currently have this working when an "Update" button is clicked on the garment tab that updates an ajaxed datalist on the branding tab (by calling a public subroutine).  It seems to work great.
This is based on using an @ Reference tag on the Garment usercontrol, casting an object to this control and then calling the subroutine. 

However, there is a situation where if a certain garment is selected, I'd like to be able to show/hide a placeholder on the Branding tab when a radcombobox selectedindexchanged event is fired.  I have a public sub on the Branding usercontrol that DOES get called (tested using ajaxpanel.alert), but the placeholders and other controls contained within it do not update.  This is doing my head in! :-)

Can anyone suggest why the datalist in the Branding usercontrol can be updated based on an event on the Garment usercontrol, and that a subroutine IS being called for the placeholder update, but the PH doesn't update?

I hope that makes sense and appreciate any insights you may have.

Cheers
Rich

4 Answers, 1 is accepted

Sort by
0
RichJ
Top achievements
Rank 1
answered on 23 Mar 2012, 12:29 AM
More Info:  I have tried replacing the asp placeholder with a panel based on another post I found, but the problem remains.
Also, there is no MasterPage/ContentPlaceHolders involved and none of the user controls are dynamic.
0
Maria Ilieva
Telerik team
answered on 27 Mar 2012, 12:20 PM
Hello,

Please note that single PageView (or control added in PageView) could not be added as AJAX initiator or updated control in the AJAX settings. The only possible approach is to add the whole MultiPage in the RadAjaxManager settings or wrap the whole control into RadAjaxPanel. When we set the MultiPage as an updated control, you should also include the TabStrip associated with it in the Ajax settings. You can review the following help topic which elaborates on this matter:
http://www.telerik.com/help/aspnet-ajax/ajax-tips-and-tricks.html


Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
RichJ
Top achievements
Rank 1
answered on 27 Mar 2012, 10:22 PM
Hi Maria,

Thanks for the response.
This still doesn't explain how I was able to update an ajaxed datalist on the second user control?

Rich
0
Maria Ilieva
Telerik team
answered on 30 Mar 2012, 02:48 PM
Hello,

As I'm not aware with the exact code you are using for ajaxifying the UserControls I could not say why exactly in this specific case the UserControl has been updated. Even your approach works in some case as I already stated this is not a supported scenario and it could lead to many other issues like in your case.

All the best,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
RichJ
Top achievements
Rank 1
Answers by
RichJ
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or