We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to implement search inside a picker


I would like to know if it is possible to search within a picker.

For example I am using the picker to populate all the states of the US in ascending order (2 characters only).

And I want to select WA which will be at the bottom of hte picker. Is there any way to use the keyboard within the picker to narrow down the search and select it.



3 Replies

PK Praveen Koildasan Syncfusion Team September 29, 2017 01:07 PM UTC

 Hi Rajesh , 
Thank you for contacting syncfusion support. 
Currently we don’t have built-in support for your requirement in SfPicker control. We have prepared a workaround sample based on your mentioned scenario . As per your example scenario mentioned in the incident we have created picker sample with states of US in ascending order. For performing the search option we have added a Entry as a custom view to the header of the picker. We have used  TextChanged event  to get the state name  and  checked Entry text with the picker items . If both matched , finally we have changed the SelectedIndex property to matched item. 
Please find the sample from the below link. 
Please go through the sample and if it does not meet your requirement, update us with detailed specification of your requirement to analyze further and provide an appropriate solution. 
Praveen Koildasan. 

RA Rajesh October 2, 2017 05:37 AM UTC

Hi Praveen,

Thanks for the reply and it was what I needed to achieve in a picker.

But I have some queries regarding the design and behavior of the picker in a real time environment. Would like to hear a solution how to achieve the behavior as explained below.

The default look should be similar to an Entry with the word "Select one". That gives the user the hint that he needs to tap it to select a value. The picker popups.

On displaying, it should be similar to the attached images. The height large enough to display multiple values without scrolling a lot. And on selecting a value and tapping OK the value is passed back to the parent form and displayed. The final outcome is in the image "Output after entering the city and selecting the State".

Also the display colors and font size need to be large enough on a 5.5" device (both Android and iOS)

The above task was achieved using a custom control (popup control, search control and a listview control).



Attachment: SFPickerWithSearch_970b1a9c.rar

ET Eswaran Thirugnanasambandam Syncfusion Team October 6, 2017 02:16 PM UTC

Hi Rajesh,

Thanks for your update.

In our current implementation we don’t have support for “ Searching functionality in sfPicker control”. We have logged feature for this and the feature will be available in any of our upcoming release. Based on your requirement we have prepared a sample for searching the item in the SfPicker items as a workaround. Please find the sample from the below link

Link: http://www.syncfusion.com/downloads/support/forum/132916/ze/Picker_sample511157100  

Please let us know if you have any other query.

Eswaran AT. 

Live Chat Icon For mobile
Up arrow icon