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

Listbox Multiple checked databinding

1 Answer 64 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Jeff Wowk
Top achievements
Rank 1
Jeff Wowk asked on 15 Aug 2017, 10:15 PM

Hey, Do you guys have an example of using two listbox controls, with the second listbox is filtered by multi selected items from the first Listbox control?

 

An example:

I have two listbox controls, both using checkboxes with a check all button.  ListboxCountry contains a list of counties.  ListboxCity contains a list of cities.  If I were to check off a country from ListboxCountry then only cities in that country will appear in ListboxCity.  If I check off three counties from ListboxCountry then cities from those three countries will appear in ListboxCity.  No checked countries then no cities.

 

I'm using v2017.2.711.40

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Aug 2017, 06:44 AM
Hello Jeff,

I've already replied to your query in your formal support ticket. I will also include the technical response here so that other developers may find it useful as well:

You can achieve this requirement using the OnItemCheck server-side event handler of the listbox, similar to this live sample:
http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/relatedlistboxes/defaultcs.aspx

Here is another demo with RadComboBox:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ListBox
Asked by
Jeff Wowk
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or