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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Examples of Search with List View?

Thread ID:

Created:

Updated:

Platform:

Replies:

141345 Dec 6,2018 03:28 PM UTC Dec 7,2018 07:27 AM UTC Angular - EJ 2 1
loading
Tags: ListView
Joe Zuber
Asked On December 6, 2018 03:28 PM UTC

Do you have any examples of using a Search in the ListView. 

For example the datagrid has a nice toolbar search example. We'd like the same thing for the ListView. 

Christopher Issac Sunder K [Syncfusion]
Replied On December 7, 2018 07:27 AM UTC

Hi Joe, 

Thank you for contacting Syncfusion support. 

Yes, we can search the list items from ListView with help of DataManager. To achieve your requirement, we have used textbox to perform search operation in ListView. The data is searched by user input and searched data is appended to ListView. Please refer to the below code snippet, 
  
onkeyup(event){ 
    let value = this.textboxEle.nativeElement.value; 
    let data = new DataManager(this.listData).executeLocal(new Query().where("text", "startswith", value, true)); 
    if (!value) { 
        this.listObj.dataSource = this.listData.slice(); 
    } else { 
        this.listObj.dataSource = data; 
    } 
    this.listObj.dataBind(); 
}  
  
  
Please let us know if you need any further assistance. 

Thanks, 
Christo

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;