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

RadComboBox closed / collapsed event on server side.

7 Answers 253 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bhanu
Top achievements
Rank 1
Bhanu asked on 24 Oct 2011, 03:35 PM


I have two Multi select combo boxes 'State' and 'City' with checkboxes(Default-Select All).The first Combo box holds names of different states and the second combo box holds names of the cities of the selected states.By default all states are selected and so the City's combo box is populated with all the cities of all the states.But if I select only a few states and open the City dropdown(State dropdown is closed/collapsed),the City dropdown should display the cities under the selected states.I am using a usercontrol for both the multi select combo boxes. Since I am retreiving all the values from database I do not want to update the City dropdown on SelectedItemChanged event of State dropdown(to reduce the number of calls to the database) rather would like to update the city dropdown onclosing / losing focus / clicking away of state dropdown. I have also Ajax implemented on this web page. After selecting one or more cities in City dropdown, will click on Go button to perform further actions. Could you please explain how to achieve this functionality ?

Thanks
Bhanu.

7 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 26 Oct 2011, 04:35 PM
Hello Bhanu,

I have prepared a sample project demonstrating a possible approach to achieve the desired functionality.

Upon closing of the drop-down list of the first RadComboBox an Ajax request to the server is made. Then on the server the checked items are retrieved using the CheckedItems collection of the combobox. The second combobox is populated based on the currently checked items from the first combobox.

You could download the attached file and give it a try locally.

I hope this helps.

Best wishes,
Ivana
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
0
Bhanu
Top achievements
Rank 1
answered on 27 Oct 2011, 01:59 PM

Hi,

Thanks for providing the sample project. But we are using Telerik.Web.UI.dll version - 2009.3.1314.20 with visual studio 2008.
It is noticted that the following properties are not available in our version.

e.Item.Checked = true;

foreach
(RadComboBoxItem item in RadComboBox1.CheckedItems)

We have created a custom user control  (.ascx) - RadComboBoxWithCheckboxes for this.
Would you please explain how to achieve the required functionality using the above version ?
Your help is very much appreciated.


Thanks
Bhanu.

0
Shinu
Top achievements
Rank 2
answered on 31 Oct 2011, 04:44 AM
Hello Bhanu,

The CheckBox property in RadComboBox is introduced in the latest version 2011.2.712.35. Try upgrading to the latest version with the help of the following documentation.
Upgrading RadControls Trial to RadControls Developer license or newer version.

Thanks,
Shinu.
0
Ivana
Telerik team
answered on 31 Oct 2011, 04:14 PM
Hello Bhanu,

You could try the following code library for your scenario: Using CheckBoxes for multi-item selection.
It shows how to use standard CheckBoxes along with RadComboBox template to select multiple RadComboBox items.

Hope this helps.

Kind regards,
Ivana
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
0
Bhanu
Top achievements
Rank 1
answered on 01 Nov 2011, 04:52 PM

Hi Telerik team,

Thanks so much for your input. We have implemented the required functionality using Telerik.Web.UI.dll version - 2009.3.1314.20 with visual studio 2008. I could not attach my code here. Is there a way to post my code to you ?


Thanks
Bhanu.
0
Ivana
Telerik team
answered on 03 Nov 2011, 04:44 PM
Hello Bhanu,

I am glad you have managed to implement the required functionality.

In order to send files to us, you have to open a support ticket. The uploaded files should have the following extensions: zip, rar, ace, jpg, gif, css, png.

Regards,
Ivana
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
0
RJ
Top achievements
Rank 1
answered on 03 Aug 2012, 12:38 PM
got my problem solved thanks

Tags
ComboBox
Asked by
Bhanu
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Bhanu
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Share this question
or