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

update/rebind RadPageView from another RadPageView

6 Answers 326 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Craig Wallace
Top achievements
Rank 1
Craig Wallace asked on 03 Aug 2010, 04:28 PM
I have five RadPageViews, each of which has a usercontrol loaded into it dynamically.  I now need to refresh the contents of one RadPageView when an event fires in the usercontrol in another RadPageView.  This should be ajax-driven. 

How can this be achieved?

Thanks.

6 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 06 Aug 2010, 11:26 AM
Hello Craig,

RadPageView is just a container, so you have to update/rebind the controls that are placed inside it - they can be accessed directly with their ID. In order to ajaxify this request, you should add an ajax setting to the ajax manager to allow the multipage to update itself.

Best wishes,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Craig Wallace
Top achievements
Rank 1
answered on 06 Aug 2010, 11:31 AM
Hi Yana,

I can now update the control, but it only seems to work if the PageView it is on is currently visible.  Is this expected?  How can it be worked around?  There are no errors if it's not visible, it just isn't updated when I switch to that tab.

Craig
0
Craig Wallace
Top achievements
Rank 1
answered on 06 Aug 2010, 04:15 PM
How do i add the ajax settings to allow a control outsaide the MultiPageView to update a control inside a PageView via ajax?

Thanks.
0
Yana
Telerik team
answered on 10 Aug 2010, 01:45 PM
Hello Craig,

The controls inside pageviews can be accessed directly with their ID, so you can add the following ajax setting:

<telerik:AjaxSetting AjaxControlID="Button1">
    <UpdatedControls>
      <telerik:AjaxUpdatedControl ControlID="updatedControlID" />
    </UpdatedControls>
</telerik:AjaxSetting>

which allows a button to update a control even if it's placed in a pageview.

Kind regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Craig Wallace
Top achievements
Rank 1
answered on 10 Aug 2010, 03:35 PM
Hi Yana,

How does this work if the ControlID is in an entirely different control scope from the AjaxControlID? 

Say I have a button with ID MyButton on an aspx page, and i also have two instances of a user control on that page.  Within the usercontrol is a textbox with ID MyTextBox.  How would I then wire up the AjaxSetting so that it updated MyTextBox in both controls when MyButton was clicked?  Would the AjaxSetting control have to exist at the same scope as MyButton?  How would it know where to find MyTextBox?

Thanks.
0
Yana
Telerik team
answered on 12 Aug 2010, 01:51 PM
Hello Craig,

The easiest solution to this issue is to place the tabstrip and multipage inside an asp panel and add a setting to the ajax manager to allow this panel to remove itself. You should also remove the other ajax settings.

The other option is to use RadAjaxManagerProxy in the user control and add the ajax setting dynamically.

Hope this helps.

Kind regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabStrip
Asked by
Craig Wallace
Top achievements
Rank 1
Answers by
Yana
Telerik team
Craig Wallace
Top achievements
Rank 1
Share this question
or