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

[Solved] Content height set to 100px

1 Answer 105 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dewey
Top achievements
Rank 1
Dewey asked on 10 Nov 2011, 04:50 PM
I am using version 2011.1.506.  I have a grid inside of a tabstrip.  For some reason the height of the grid is being arbitrarily set to 100px.  Here is the view code:

        <div style="float:left; width:560px">
            @(Html.Telerik().TabStrip().Name("ManualRecTabstrip")
                //.HtmlAttributes(new { style = "height: 400px; width:520px" })
                .Items(tabstrip =>
                    {
                    tabstrip.Add()
                        .Text("Payments")
                        //.ContentHtmlAttributes(new { style = "height:400px; width:520px" })
                        .Content(Html.Partial("Payments", Model.PaymentsViewModel).ToString());
                    tabstrip.Add()
                        .Text("Deposits")
                        //.ContentHtmlAttributes(new { style = "height:400px; width:520px" })
                        .Content(Html.Partial("Deposits", Model.DepositsViewModel).ToString());                   
                    })
                .SelectedIndex(0)
                .ClientEvents(evt => evt.OnSelect("tabstrip_onSelect"))
            )
        </div>

I tried setting the ContentHtmlAttributes for the tabstrip and for each tab, but no help. 

Here is the partially-expanded rendered markup from Firebug:

<div id="ManualRecTabstrip" class="t-widget t-tabstrip t-header">
 <ul class="t-reset t-tabstrip-items">
  <li class="t-item t-state-default t-state-active">
  <li class="t-item t-state-default">
 </ul>
 <div id="ManualRecTabstrip-1" class="t-content t-state-active" style="display:block">
  <div id="grdPayments" class="t-widget t-grid" style="width:99%; height:320px">
   <div class="t-grid-header">
   <div class="t-grid-content" style="height:100px">
    <table id="ManualRecTabstrip_Tab0" cellspacing="0">
   </div>
  </div>
  <script type="text/javascript">
 </div>
 <div id="ManualRecTabstrip-2" class="t-content">
</div>

Notice the  <div class="t-grid-content" style="height:100px">.  This is controlling the height of the grid.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Nov 2011, 09:21 AM
Hello Dewey,

The default value of the height style that you are talking about is 200px and it is rendered from the server. If it is different, then something must be setting it. Normally this height is configured in the Grid declaration:

.Scrollable(scrolling => scrolling.Height("100px"))

Please investigate further and send us a runnable demo if you need assistance.

All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
TabStrip
Asked by
Dewey
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or