Problem with Displaying Tabs

5 posts, 0 answers
  1. srinivas
    srinivas avatar
    21 posts
    Member since:
    May 2012

    Posted 14 Jul 2012 Link to this post

    Hi,

    I am having problem with dynamically adding tabs.I want to add a new tab when ever i have clicked the addtab in the tabstrip.
    Then a new tab with the content is adding.but the thing is it is showing two contents.
    I am sending a sample project please have a look and can you provide me an solution or sample 

    Thanking You
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 18 Jul 2012 Link to this post

    Hi Srinivas,

    There is a problem with resources that you included in your page - if you use a combined Kendo script, you should not include the separate files because this will most likely cause conflicts. In the getting started help topic you can find more detailed information how to set up your project, the JavaScript dependencies section might be useful as well.

    The other issue that I noticed with your code is that the TabStrip is initialized twice. Please revise those issues and let me know if the problem still persists.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. srinivas
    srinivas avatar
    21 posts
    Member since:
    May 2012

    Posted 18 Jul 2012 Link to this post

    Hi Alexander,

    Thanks for the Reply.

    I have changed the script files and used only one common file and i also defined the tabstrip only once now
    But still i am getting the same error.I am sending the changed code also.Please intimate me still if there are any errors.
    Please provide me a sample.


    Thanks and Regards,
    Srinivas 
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 23 Jul 2012 Link to this post

    Hello Srinivas,

    The problem is caused by the multiple initialization of the TabStip widget (on the select event).
    select: function (element) {
        var tabStrip = $("#tabStrip").kendoTabStrip().data("kendoTabStrip");

    In order to retrieve the client side object only $("tabStrip").data("kendoTabStrip") should be used. To fix the issue I performed the following change:
    var tabStrip = $("#tabStrip").kendoTabStrip({
        select: function (element) {
            //....
        }
    }).data("kendoTabStrip");

    For convenience I attached the modified page. I hope this helps.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. srinivas
    srinivas avatar
    21 posts
    Member since:
    May 2012

    Posted 24 Jul 2012 Link to this post

    Hello Alexander,


    It works fine now.Thank you for the reply.




    Thanks and Regards,
    Srinivas
Back to Top