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

Toolbar SplitButton no scrolling?

3 Answers 109 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 22 Mar 2018, 12:01 PM

Hello,

I have a toolbar with a Split Button and many entries which are not all visible because the height of the screen is not big enough...
How to have a scrolling of the splitbutton dropdown list if the screen is to small i.e. there a more items to display depeneding on the screen size (I don't want to have a fix height)

see attached picture

3 Answers, 1 is accepted

Sort by
0
Magdalena
Telerik team
answered on 26 Mar 2018, 07:57 AM
Hello Robert,

You can set a custom height to split button popup by applying the following CSS:
.k-split-wrapper {
    height: 300px !important;
}
.k-split-container {
    height: 100%;
    overflow: auto;
}


Regards,
Magdalena
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 26 Mar 2018, 02:59 PM

Hello,

but with that fix height it Looks bad if there are fewer items then the height - isn't there a better (Javascript) solution to have
only Scrolling if necessary? (see attached Picture)

0
Magdalena
Telerik team
answered on 27 Mar 2018, 07:38 AM
Hi Robert,

The easiest way is to use max-height instead.
.k-split-wrapper {
    max-height: 300px !important;
}
.k-split-container {
    max-height: 100%;
    overflow: auto;
}

If you would like to set the height dynamically, you can achieve it by a custom JavaScript calculation in the toolbar open event. If the .k-split-container element has set the max-height:100% by CSS, suffice it to set the dynamic height only to the .k-split-wrapper element.

Regards,
Magdalena
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Toolbar
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Magdalena
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Share this question
or