Skip to content

Move the Search Outside of the Grid

The current integrated search work in phpGrid is that you can type search text and the data will be filtered as you type, without reloading the page. The question is how to setup a search function just like that, but outside the grid. 

Use javascript for this (external search) to happen. Pass search criteria through the "postData" property, then trigger the grid reload.  You can also pre-fill the search criteria in the search bar this way. 

Here's a code example:

$(function() {
        postData:{"search":true,"col1":"search_value1,"col2":"search_value2" ….},

Feedback and Knowledge Base