Kendo Multiselect(applies virtualization) width adjust for data

1 Answer 207 Views
MultiSelect
GOVERTHANAN
Top achievements
Rank 1
Iron
GOVERTHANAN asked on 13 Sep 2021, 08:11 AM
Hi,

The width of the dropdown list which appears when you click on the Kendo MultiSelect control is the same width as the multiselect control itself.
Is there a way to increase the dropdown width so items which are longer can be displayed on the same line?

P.S: i had implemented virtualization for multiselect

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Sep 2021, 07:57 AM

Hi,

It is possible to set the width of MultiSelect's dropdown through the list.width method - Dojo snippet:

var multiselect = $("#orders").data("kendoMultiSelect");

// Set the width of the drop-down list.
multiselect.list.width(400);
Note that this way it is possible to set a fixed width to the dropdown. The autoWidth setting does not work with virtualization, which is a limitation.

As the items used with virtualization are templates, it is possible to use a native tooltip by binding the long text to the title attribute, which would still allow users to see the whole text, even for items longer than the dropdown width - Dojo snippet.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
MultiSelect
Asked by
GOVERTHANAN
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Share this question
or