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

Listbox filter

3 Answers 832 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Mick
Top achievements
Rank 1
Mick asked on 20 Jun 2017, 04:21 PM

Is there a suggested way to filter the source listbox? I'm hoping to be able to type into a text box above the listbox and have the items in the listbox filter based on the value in the textbox.

I was looking into a basic angular filter, but am not sure of the best way to go about using it as it needs to be placed on the iterating element. 

 

Thanks!

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 22 Jun 2017, 11:45 AM
Hello Mick,

If you would like to filter the items in a ListBox component you can get reference of the dataSource and call the filter() method for it.

In order to get reference of the DataSource you can use the code from below:

var ds = $("#listBoxID").data("kendoListBox").dataSource;


Regards,
Viktor Tachev
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.
0
Paul Ridden
Top achievements
Rank 1
Veteran
answered on 24 Sep 2018, 09:12 AM

I also need the Listbox control to have client filtering. Just like the DevExpress Listbox!

https://demos.devexpress.com/MVCxDataEditorsDemos/Editors/ListBoxFiltering

 

0
Viktor Tachev
Telerik team
answered on 25 Sep 2018, 09:30 AM
Hello Paul,

The example below illustrates how filtering for the ListBox can be implemented. Give it a try and let me know how it works for you.



Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ListBox
Asked by
Mick
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Paul Ridden
Top achievements
Rank 1
Veteran
Share this question
or