Telerik
Skip Navigation LinksHome / Community / Forums / ASP.NET > Tabstrip > Refresh PageView on TabClick

Answered Refresh PageView on TabClick

Feed from this thread
  • bslaght Master bslaght's avatar

    Posted on Dec 6, 2007 (permalink)

    My Project contains:
    TabStrip w/ 3 Tabs
    MultiPage with 3 PageViews
    In PV1 I have a radGrid
    In PV2 I have a radGrid
    In PV3 I have a FormView

    After Inserting the FormView in PV3 I would like the radGrids to be refresh.  I this the best spot to refresh the grids is on the TabClick of their respective tabs.

    So how should I should I do this?  I would like to use AJAX, to save the PostBack, so these are my thoughts...
    1. Wrap grids in AjaxPanels?
    2. Use AjaxManager to force updates on the radGrids from Tabstrip?
    3. Refresh PageViews on TabClick with AjaxManager

    etc.. this list could keep going. But I am wondering what is the best way.
    Also currently I am working in VS 2008 and using Q2 2007 Rad Controls and RadAjax not working correctly.  So how else can I get this to work?

    Reply

  • Telerik Admin admin's avatar

    Posted on Dec 10, 2007 (permalink)

    Hi bslaght,

    Thank you for contacting us and up to your questions:
    • this will not be a good approach as RadAjaxPanels can handle only its own ajaxification. You will not be able to update the Tabs in this case neither any other outside control.
    • this is the easiest approach - simply set AjaxSettings for the TabStrip control as initiator and the MultiPage control as updated control and the AjaxManager will take care of the rest.
    • #2 point covers that scenario as well.
    Can you share what is not working correctly with RadAjax? We have already switched to VS2008 as well and everything works correctly on our end. Any additional information will be highly appreciated.

    Sincerely yours,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • bslaght Master bslaght's avatar

    Posted on Dec 10, 2007 (permalink)

    Thanks for the update, I have tried setting the tabstrip as the ajax initiator and multipage as the updated control, but this does not seem to work.  The clicked tab appears with it's associated pageview, however the grid inside the pageview is not updated with teh newly inserted record.  However the ajax does run cause I see teh loading panel and takes sec for teh refresh to complete, but the grid is not update.

    As for RadAjax in VS 2008, in teh design view, run time control of radAjax, none of teh controls on the pages are listed in the radAjax manager settings so I can't "check" them, I can only write them in code manually.  I can send a screen shot if required.

    Reply

  • Telerik Admin admin's avatar

    Posted on Dec 12, 2007 (permalink)

    Hello bslaght,

    The Ajax will update the control in the AjaxSettings set as updated control. However if the Grid is not being rebound, no changes will be shown. Does this work with standard postbacks? You can send us a sample project to look into if needed.
    As for the VS2008 problem - we are aware of it. It appears only in MasterPage scenarios and we are already working on the issue. For the time being you will have to manually add the ajaxsetting from the aspx of programmatically in code behind.

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • bslaght Master bslaght's avatar

    Posted on Dec 12, 2007 (permalink)

    Thanks for the update.  Is there a chance I can see some code which shows me how to do a grid rebind?

    As for the issue with VS2008, glad your aware of theproblem and yes I am using masterpages, so hopefully we will see a fix in the final of Q3.

    Brett

    Reply

  • Answer bslaght Master bslaght's avatar

    Posted on Dec 12, 2007 (permalink)

    I figured it out.

    rgEvent.rebind()  works perfect.

    Brett

    Reply

  • Jeyaraman avatar

    Posted on Dec 21, 2007 (permalink)

    Hi  bslaght,

    Im facing same issue that what u faced.
    I through the below discussion  and im not able to come across that where i have call this  rgEvent.rebind(). Please guide me to solve the issue.
    Waiting for ur reply.

    Thanks and Regards
    Jai
     

    Reply

  • bslaght Master bslaght's avatar

    Posted on Dec 21, 2007 (permalink)

    HI Jeyaraman
    I do my rebind in a bunch of places in my code behind.  But here is one example.

    Protected Sub fvAddEvents_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) Handles fvAddEvents.ItemInserted

    rmpEventsCal.SelectedIndex = 0

    rtsEventsCalendar.SelectedIndex = 0

    rgEvents.Rebind()

    End Sub

    Basically that way, when the insert complete, my radgrid refreshes (using ajax) and rebinds to the newly updated table data.  My ajax settings look like this...

    <rad:AjaxSetting AjaxControlID="fvAddEvents">

    <UpdatedControls>

    <rad:AjaxUpdatedControl ControlID="rmpEventsCal" LoadingPanelID="LoadingPanel1">

    </rad:AjaxUpdatedControl>

    <rad:AjaxUpdatedControl ControlID="rtsEventsCalendar"></rad:AjaxUpdatedControl>

    <rad:AjaxUpdatedControl ControlID="rgEvents"></rad:AjaxUpdatedControl>

    </UpdatedControls>

    </rad:AjaxSetting>

    Reply

Back to Top

Skip Navigation LinksHome / Community / Forums / ASP.NET > Tabstrip > Refresh PageView on TabClick

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.