EasyUI Forum

General Category => General Discussion => Topic started by: thecyberzone on July 18, 2018, 12:30:49 AM



Title: Search and Filter Datagrid contents as per text entered in search textbox
Post by: thecyberzone on July 18, 2018, 12:30:49 AM
I have a table containing 7-8 columns like name, tno, designation, email etc. Initially I want to display all the records from table in the grid (table contains approximately 20,000 records), but as soon as typing is done in the search textbox, rows in the table will be filtered matching the string typed in the textbox WITH ANY FIELD in the table, as well as typed string will be highlighted in the row content.

Same can be achieved in the angular easily. I am attaching one screen shot of the same application done using angular. Anybody please help me by supplying the code using EasyUI components.

Thanks in advance.



Title: Re: Search and Filter Datagrid contents as per text entered in search textbox
Post by: stworthy on July 19, 2018, 02:18:59 AM
This example demonstrates how to highlight the cells after searching. Of course, you should do the real filtering and reload the data according to your projects.

http://code.reloado.com/ehimuc3/edit#preview


Title: Re: Search and Filter Datagrid contents as per text entered in search textbox
Post by: thecyberzone on July 19, 2018, 11:27:24 PM
Main issue is behind real time filtering the table data, actually my table contains approximately 20,000 records, so real time filtering and reloading of data takes a visible time, where as in AngularJS it is done with blazingly fast speed, that's why I want a help from you so that same can be achieved through EasyUI components.

Waiting for your help.


Title: Re: Search and Filter Datagrid contents as per text entered in search textbox
Post by: stworthy on July 20, 2018, 07:55:37 AM
This example displays 20000 rows using virtual scroll view.

http://code.reloado.com/ehimuc3/2/edit#preview


Title: Re: Search and Filter Datagrid contents as per text entered in search textbox
Post by: thecyberzone on July 25, 2018, 12:12:00 AM
I have checked the same thing, but it is desirable to render gridview as soon as text in the searchbox changes, i.e., if I call the dataload routine from the keydown event of the searchbox, the filtering become slow.

Moreover in the given example data is reloaded for the purpose of highlighting, no changes in number of rows in this example, but for my purpose I want to load those rows only from the table which matches field contents of table with the text entered in the searchbox on the fly, with the keystrokes of searchbox.