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

same controller in different tab (tabstrip)

2 Answers 119 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Roberto
Top achievements
Rank 1
Roberto asked on 04 Aug 2015, 02:35 PM

Hello,
I have this problem: using a kendo mvc tabstrip, in each tab load content using LoadContentFrom, loaded different views, but in each of these have included a menu toolbar, using Html.RenderPartial ("~ / Views / Toolbar.cshtml"); .
The problem is that only in the first tab loaded, the toolbar is visible, the other tab is not visible, and there aren't errors in the console or in the application.
I think it is a problem related to the fact that the id of the toolbar is the same, but I'm not sure, in any case I would not know how to solve it.
Someone can you help me?

Thanks, Marco

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 06 Aug 2015, 08:26 AM
Hello Marco,

Indeed, this seems to be caused by the identical IDs, which prevents the other toolbars from initializing. You could try passing a unique ID through the PartialView's ViewData and using it to generate the the Toolbar's name. For example: 
@(Html.Kendo().ToolBar()
    .Name("ToolBar" + ViewData["name"].ToString())


Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Roberto
Top achievements
Rank 1
answered on 27 Aug 2015, 07:01 AM

Thanks for your help, this way works :-)

Regards

Tags
TabStrip
Asked by
Roberto
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Roberto
Top achievements
Rank 1
Share this question
or