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

Combobox Input Height (with Checkboxes)

2 Answers 118 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 16 Jan 2012, 06:52 PM
Hello,

I have set the height of my combo in CSS but when I check the items in the dropdown I would like the items to be vertically aligned to the top of the INPUT and to wrap. Here is the CSS I am using (which does correctly set the height but does not align or wrap the selected items.
#ctl00_Main_LeadMgt1_comboGroupSIC .rcbInput
    {
        height: 40px;
        white-space: normal !important;
        vertical-align: top !important;
    }

I also attached an image that show the selected items center aligned. If I selected one more item then the input will show "5 items checked" what I would want is for the input to wrap the 5th item and then once no more items could be displayed the "5 items checked" will display.
Thank you!

2 Answers, 1 is accepted

Sort by
0
Kaushal
Top achievements
Rank 1
answered on 17 Jan 2012, 11:05 AM

On the client and the server sides, you can use the get_checkedItems() and CheckedItems properties to get all items, which are checked.
The Text property of the combobox holds the concatenated texts of all checked items. The SelectedValue property is empty because there is no single selected item. You can get the values of all checked items from the aforementioned properties.


Please refer to this for more:

http://www.telerik.com/help/aspnet/combobox/combo_client_model.html


0
Kalina
Telerik team
answered on 17 Jan 2012, 11:26 AM
Hi Jeff,

As far as I understand, you want to show the texts of all checked items within the RadComboBox input as a multi-line text.
I am afraid that you can obtain only the first part of this requirement - if you set the CheckedItemsTexts property of the RadComboBox to "DisplayAllInInput" - the texts of the checked items will be displayed within the input as a comma-separated string.
However, even if you succeed to increase the height of the control input - you will not be able to display multi-line text in it, simply because the text input (<input type=”text” ) does not support this.

Regards,
Kalina
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ComboBox
Asked by
Jeff
Top achievements
Rank 1
Answers by
Kaushal
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or