update/rebind RadPageView from another RadPageView

7 posts, 0 answers
  1. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 03 Aug 2010 Link to this post

    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.
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 06 Aug 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 06 Aug 2010 Link to this post

    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
  5. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 06 Aug 2010 Link to this post

    How do i add the ajax settings to allow a control outsaide the MultiPageView to update a control inside a PageView via ajax?

    Thanks.
  6. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 10 Aug 2010 Link to this post

    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
  7. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 10 Aug 2010 Link to this post

    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.
  8. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Aug 2010 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017