This is probably a dumb question and perhaps I am misusing Cgridview.
I can’t figure out how to search Gridview with a form. I know how to use the search feature in the grid itself, and I know how to setup CActiveDataProvider with criteria to send the right data to the grid in the first place… but I can’t figure out how to have a search form whose fields are not necessarily shown in gridview!
I want to have a search form that will let me search fields that I am not necessarily displaying in the grid. Therefore, I can’t use the advanced search thing and I can’t use grid filters.
When I tried to implement this the first time I can get the grid to show up but any attempt to sort / paginate / filter the grid results in the grid going away. This is a surprisingly hard thing to search for an answer to because the words grid and search are so common. Just looking for a step in the right direction, or a suggestion of a better way to acheive what I’m trying to do.
Included in the database but not part of the grid. I want to search on columns I am not displaying.
I did a bunch of reading on this last night and it indeed looks like a stupid question. I need to study the ‘advanced search’ that gii automatically generates for admin views a little more.
For starters I need the form to submit via GET instead of POST.
It also occurred to me that the columns I want to search but not display need to be selected in the activeDataProvider. Still getting used to using those and I had been using ‘select’ to limit the columns returned.