How to select Tab before ajax call

1 posts, 0 answers
  1. Rizwan
    Rizwan avatar
    30 posts
    Member since:
    Mar 2009

    Posted 19 Sep 2009 Link to this post

    Hi
      If you please visit this Url
    http://mono.telerik.com/TabStrip/Examples/ApplicationScenarios/LoadOnDemand/DefaultCS.aspx
    and click on tab products then you will find that "Products" tabpage will not get selected until system will complete ajax call which might be fine as viewstate does not exist. But in my applicaiton I have same scenairo (not the the load on demand but load on tab change) but veiw state does exist , Some thing like this

    <

     

    telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Web20" AutoPostBack="true" Width="450px"

     

     

    MultiPageID="mpvMain" SelectedIndex="0" OnTabClick="RadTabStrip1_TabClick">

     

     

    <Tabs>

     

     

    <telerik:RadTab runat="server" Text="Contacts" PageViewID="mpContacts" Selected="true" Value="CONTACTS">

     

     

    </telerik:RadTab>

     

     

    <telerik:RadTab runat="server" Text="Details" PageViewID="mpDetails">

     

     

    </telerik:RadTab>

     

     

    <telerik:RadTab runat="server" Text="Group Processing" PageViewID="mpGroupProcessing">

     

     

    </telerik:RadTab>

     

     

    <telerik:RadTab runat="server" Text="Groups" PageViewID="mpGroups">

     

     

    </telerik:RadTab>

     

     

    </Tabs>

     

     

    </telerik:RadTabStrip>

     

     

     

    <telerik:RadMultiPage ID="mpvMain" runat="server" SelectedIndex="0" >

     

     

    <telerik:RadPageView runat="server" ID="mpContacts" CssClass="pageView" >

     

    This is contacts Tab, Grid here

    </telerik:RadPageView>

     

     

    <telerik:RadPageView runat="server" ID="mpDetails" CssClass="pageView" >

     

    Detail Page, Some textboxes and labels here

     

    </telerik:RadPageView>

     

     

    <telerik:RadPageView runat="server" ID="mpGroupProcessing" CssClass="pageView" >

     

    This is Group Processing,Some textboxes ,labels and grid here

     

    </telerik:RadPageView>

     

     

    <telerik:RadPageView runat="server" ID="mpGroups" CssClass="pageView">

     

    This is Groups tab, Some textboxes and labels here

     

    </telerik:RadPageView>

     

     

    </telerik:RadMultiPage>

     



    Server side

     

    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)

     

    {

    System.Threading.

    Thread.Sleep(5000);

     

    // I basically dont want this here , but it should automatically be done on client side before ajax call
    e.Tab.Selected =

    true;

     

    }



    Basically AjaxLoading panel should move on top of textboxes which belongs to specific tab which is about to popuplate and user should see those populating.

    May be  I am doing something wrong  or missing some thing, Your help would be highly appreciated.
    Best Regards
    Rizwan Bashir
Back to Top