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
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
0
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
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
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
Hello Srinivas,
The problem is caused by the multiple initialization of the TabStip widget (on the select event).
In order to retrieve the client side object only $("tabStrip").data("kendoTabStrip") should be used. To fix the issue I performed the following change:
For convenience I attached the modified page. I hope this helps.
Regards,
Alexander Valchev
the Telerik team
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
It works fine now.Thank you for the reply.
Thanks and Regards,
Srinivas