Is there a way for me to create a button, or a drop down list, for changing the select criteria of an active grid? For example, my default select is to get everything from the database: $g->select_command = “SELECT *
from appform”.
What I want to do is to create some different SQL queries which could be applied to the active grid. One example might be:
“select * from appform where status = ‘InProcess’ and ISNULL(comments)”
1 Answers
This demo added a checkbox on toolbar, which calls a JS function and reloads by posting ‘query’ param to server. On server, if this variable is found posted, it changes select_command query.
Demo code here: https://gist.github.com/gridphp/94590490697b97d7f1f239c89bf8c60d
Your Answer