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

Hide empty dropdown

2 Answers 91 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John Hadjioannou
Top achievements
Rank 1
John Hadjioannou asked on 27 Jun 2010, 08:34 AM
I would like to hide the dropdown when it is empty - how could that be achieved?

Ideally, I would like to reduce it's size to match the contents if there is empty space at the bottom - but that may be too difficult.

Thanks
John

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 28 Jun 2010, 06:45 AM
Hi,

You can cancel the 'OnClientDropDownOpening' by using the code "args.set_cancel(true)" if there are no items in the RadComboBoxItems collection. You can check the number of items from client-side. The following documentation will help you in achieving this:
Client-Side Basics
RadComboBox object

Also checkout the following forum which discussed about setting the dropdownwidth according to items.
Auto Width

KB Article - Set the Height of RadComboBox based on number of items


-Shinu.
0
John Hadjioannou
Top achievements
Rank 1
answered on 28 Jun 2010, 11:50 AM
Thank you

John
Tags
ComboBox
Asked by
John Hadjioannou
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
John Hadjioannou
Top achievements
Rank 1
Share this question
or