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

[Solved] Closing the item area of the drop down

2 Answers 81 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Baatezu
Top achievements
Rank 2
Baatezu asked on 26 May 2009, 09:29 PM
I'm using the Footer of the RadComboBox to load a control so I can add new items to the database for the RCB.
Having my user control wrapped in a DIV, I start it with display:none and use a link and jQuery to show/hide this control.

What I would like to do is to collapse the item list when I show my usercontrol. 

Looking at the source, the div containing the UL does not have an ID. (Which, if I can do suggest through here, maybe give it an id?)

I'm still pretty new with jQuery (love it, but not good yet) so I don't know how to pull it with that. I would like a cleaner way, since I think jquery may do it to all item sections in all RCB's on the page.

Any tips be much appreciated

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 29 May 2009, 01:08 PM
Hello Baatezu,

You can find the DIV of the dropdown list by its CSS class name using either:
$(".rcbSlide") or $(".RadComboBoxDropDown")

Alternatively, you can call the hideDropDown() javascript method of the RadComboBox client object.

Do not miss our new help articles on using jQuery.

Kind regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Baatezu
Top achievements
Rank 2
answered on 29 May 2009, 06:42 PM
That will hide the entire drop down, and I just want to make the div of the items go away.
Thanks for the pointer though, it got me going in the correct direction. What I do is 
$('#' + items + ' .rcbScroll.rcbWidth').toggle(!show);
where items is the ID if the dropdown list. (I have a function with this doing a few things for me)

I used $(' .rcbScroll.rcbWidth').toggle(); at first (going off your example) and it worked, but on all of them. The ID in the beginning limits to the one I'm working in.

Thanks.
Tags
ComboBox
Asked by
Baatezu
Top achievements
Rank 2
Answers by
Veselin Vasilev
Telerik team
Baatezu
Top achievements
Rank 2
Share this question
or