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

Nesting controls in a tab strip

2 Answers 245 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 16 Nov 2012, 08:10 PM
Can you nest Grid controls inside a tab strip?  Is so, is there an example?

2 Answers, 1 is accepted

Sort by
0
Matthew
Top achievements
Rank 1
answered on 04 Jan 2013, 08:27 PM
You can, but it messes up the style something fierce. I just cannot see to get it to work, even a simple grid inside a tabstrip ends up having zero width and no column attributes applied =(
0
AWL
Top achievements
Rank 1
answered on 23 Jan 2013, 05:03 AM
I found a work around for this. You have to use a js initialized tabstrip. If you try to nest the grid HTML helper inside the .content attribute of the Tabstrip HTML helper, the initialization methods conflict and the tabs don't function.

<div id="Tabs">
           <ul>
               <li class="k-state-active">Tab One</li>
               <li>Tab Two</li>
           </ul>
           <div>
               @(Html.Kendo().Grid(IEnumerable<Model> models))
           </div>
           <div>
               @(Html.Kendo().Grid(IEnumerable<Model> models))
           </div>
       </div>
 
<script type="text/javascript">
 
         
        $("#Tabs").kendoTabStrip({
            animation:  {
                open: {
                    effects: "fadeIn"
                }
            }  
        });
</script>
Slightly obnoxious, but it works just fine.

Slightly more obnoxious, but it works just fine.
Tags
TabStrip
Asked by
Scott
Top achievements
Rank 1
Answers by
Matthew
Top achievements
Rank 1
AWL
Top achievements
Rank 1
Share this question
or