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

Is Height:100% with filler possible?

7 Answers 84 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pat
Top achievements
Rank 1
Pat asked on 18 Feb 2011, 04:45 AM
Seems like right now the control will just size itself for whatever space it needs and it's just wrecking the page

I'm trying to get it to fillup the entire height of the area that it has. Basically I'd like to have it, act like outlook where

1) only one node is expanded and always at the top (but it's main icon still also stays displayed at the bottom)

2) If the active group doesn't need all that space, then the extra space is just there, blank.  If it needs more space, then there's just a scrollbar within the active group

#2 is the most important one right now.  Anyway to do this?

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 18 Feb 2011, 08:07 AM
Hi pat,

Unfortunately both features are not supported. The panelbar cannot work like outlook out of the box.

Rgards,
Atanas Korchev
the Telerik team
0
Pat
Top achievements
Rank 1
answered on 18 Feb 2011, 02:05 PM
Are there any plans to at least add support for height:100% or even a fixed height with some filler?

When each group has different number of subitems, the constantly changing overall control height everytime a different group is picked is just really annoying. Demoed it, and they said no way...
0
Atanas Korchev
Telerik team
answered on 18 Feb 2011, 02:09 PM
Hello pat,

I logged this as a feature request. We will consider it for a future release. I have also updated your Telerik points.

Regards,
Atanas Korchev
the Telerik team
0
Pat
Top achievements
Rank 1
answered on 18 Feb 2011, 02:19 PM
Thanks, I appreciate it.
0
bubus
Top achievements
Rank 1
answered on 08 Jul 2011, 07:47 PM
is possible that in this release that is about to leave to include this feature. Thank you.
0
Tosin
Top achievements
Rank 1
answered on 30 Nov 2011, 09:36 PM
Based on my understanding of the initial question, the below script should work

<script type="text/javascript">

 

    $(document).ready(function () {
 $('.t-group').css({ overflow: "auto", height: ($(window).height() - 150) });
    });

</script>

Note: 150 will have to replaced by any number that will suite your purpose. In my case the Page Header was 150px in height. Mathematically, panel bar height = The height of the window - Page Header height.

you might also want to make sure that this height is retained after you collapse and expand. If it doesn't then you can try the following:

Assuming your mark up looks like this:

 

<input type="hidden" id="panelAdjuster" value="0" onchange="test();"/>

@{ Html.Telerik().PanelBar()

        .Name("RandomPanelBar")

        .HtmlAttributes(new { style = "width: 235px; float: left; margin-bottom: 0px; vertical-align:top;"})

        .ClientEvents( events => events

            .OnExpand("Sizer") )    ...


then the below script should fix it

<script type="text/javascript">

    $(document).ready(function () {

        $('.t-group').css({ overflow: "auto", height: ($(window).height() - 150) });      

        Sizer = function () {

            $('#panelAdjuster').trigger('onchange');

                  }

        test = function () {

            var id = setTimeout(function () {               

                $('.t-group').height(($(window).height() - 150))

                             .css({ overflow: "auto" });

            },

            1000);

           

        }

    });

   

</script>



0
Suvendu
Top achievements
Rank 1
answered on 10 Jan 2012, 05:46 PM
Hi Tosin,

Do you have a sample which you can share ?

Thanks,
Suvendu.
Tags
PanelBar
Asked by
Pat
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Pat
Top achievements
Rank 1
bubus
Top achievements
Rank 1
Tosin
Top achievements
Rank 1
Suvendu
Top achievements
Rank 1
Share this question
or