EasyUI
Add search functionality in DataGrid
Tutorial » Add search functionality in DataGrid
In this tutorial we will show you how to get data from database and display them to datagrid. And then demonstrate how to search through the results according the search terms the user enters.
Create DataGrid
Create the datagrid with paging feature and then add a toolbar to it.
The toolbar is defined as:
When user enters search values and press search button, the 'doSearch' function will be called:
The code above we call 'load' method to load new datagrid data. We need to pass 'itemid' and 'productid' parameters to server.