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

DropDownList multicolumn with headers - resize problem

4 Answers 304 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Catalin
Top achievements
Rank 1
Veteran
Catalin asked on 31 Oct 2013, 08:35 AM
Hi, 
The template feature of the KendoUI DropDownList works fine, I’m very pleased with it. I can easily display a “multicolumn” view, but there is a little issue, I think. Trying to add columns headers is not that easy…


I found on the Telerik forums a brilliant idea, which consists of adding the following handler on the DataBound event:

function boundUsage(e) {
    $('<div style="overflow:auto;"/>')
      .html("<table><tr><td width='100px'>Code</td><td width='100px'>Libellé</td></tr></table>")
      .prependTo('#Poltf_Usage_id-list');
}

But the result seems to me a little confusing: the Poltf_Usage_id-list keep its size (200px), while the Poltf_Usage_id-listbox (ul) is deplaced, thus displaying the last <li> outside the div. 

As a solution (not very elegant), I tried to add on the BoundUsage function

$('#Poltf_Usage_id_listbox').css("height", "80%");

in order to force the list to fit into its parent. Another idea, please?

Thank you

4 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 01 Nov 2013, 10:39 AM
Hello Catalin,


Here is a sample approach to create a multicolumn list in the DropDown. Please let me know if that was the information that you were looking for.

Have a great day!

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Catalin
Top achievements
Rank 1
Veteran
answered on 04 Nov 2013, 09:52 AM
Another day, another happy customer :)

Thank you, 
It is exactly what I 've been looking for!
0
Catalin
Top achievements
Rank 1
Veteran
answered on 04 Nov 2013, 03:53 PM
Te dropdownList works very well now, I have my multicolumns popup and the header.

Unfortunately, in this configuration, I cannot add an optionLabel ( see this sample ). Any idea?
Regards,
Catalin

LE: Actually, I found this topic and it explains the problem. I will manage to customize my template in order to handle undefined properties.
0
Dimiter Madjarov
Telerik team
answered on 05 Nov 2013, 07:31 AM
Hi Catalin,


Thanks for keeping me updated. If you are experiencing further issues, do not hesitate to contact us again.

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Catalin
Top achievements
Rank 1
Veteran
Answers by
Dimiter Madjarov
Telerik team
Catalin
Top achievements
Rank 1
Veteran
Share this question
or