Add new tab in and reflect that on UI.

3 posts, 1 answers
  1. Susheel
    Susheel avatar
    8 posts
    Member since:
    Dec 2014

    Posted 31 Mar 2015 Link to this post


    i have written code to add new tab and the code is : 

    RadTabStrip objRadTabStrip = (RadTabStrip)Page.Master.FindControl("DefaultContent").FindControl("radTabStrip1");
    RadTab objChildTab = new RadTab();

          objChildTab.Text = objTabItem.TabText;
         objChildTab.Value = objTabItem.TabValue;
         objChildTab.PageViewID = objTabItem.PageViewID;
         objChildTab.ToolTip = objTabItem.TabURL;

    this code is written on button click which is present on user control(.ascx) page.
    user control is called in demo.aspx page and this demo.aspx page is called from some other page.
    So when i add new tab at that time it not visible on UI but if i refresh the whole page the it gets visible and it takes too much time to refresh full page.

    I want as soon as i click on add new tab button the newly crated tab should be visible on UI.

    Please help me to do this.
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 02 Apr 2015 Link to this post

    Hi Susheel,

    A likely reason for such behavior is that you are using AJAX for the button click and the server response does not include the RadTabStrip. In this case, changes you make on the server will not reflect on the client until the control in question participates in the response - either gets included in the partial rendering, or a full postback occurs.

    If modifying the way you use AJAX is not an option, I can suggeset adding the tab on the client: If you must definitely go through the server code, you can register the call to the needed script as explained here:


    Marin Bratanov

    See What's Next in App Development. Register for TelerikNEXT.

  3. DevCraft R3 2016 release webinar banner
  4. Susheel
    Susheel avatar
    8 posts
    Member since:
    Dec 2014

    Posted 02 Apr 2015 in reply to Marin Bratanov Link to this post

    Hi Marin,

    Thanks A Lot your suggestion on Ajax worked for me.

Back to Top