This is a migrated thread and some comments may be shown as answers.

Problem with Displaying Tabs

4 Answers 122 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
srinivas
Top achievements
Rank 1
srinivas asked on 14 Jul 2012, 08:29 AM
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

4 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 Jul 2012, 01:26 PM
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!
0
srinivas
Top achievements
Rank 1
answered on 18 Jul 2012, 01:48 PM
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 
0
Alexander Valchev
Telerik team
answered on 23 Jul 2012, 07:50 AM
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!
0
srinivas
Top achievements
Rank 1
answered on 24 Jul 2012, 08:46 AM
Hello Alexander,


It works fine now.Thank you for the reply.




Thanks and Regards,
Srinivas
Tags
TabStrip
Asked by
srinivas
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
srinivas
Top achievements
Rank 1
Share this question
or