After looking this for almost a week I decided to use DATATABLES as my grid plugin.
It is not as heavy as jqGrid and has a great example page... Also, the main advantage I found is that it does not create a complex container structure in the DOM. Using FIREBUG you can see that most of the grid uses <div> inside <div> + <table> + etc. Datatables only uses a <table></table>.
It is not very well documented, but using FIREBUG I was able to see the post requests and the results sent from the server, and that is just GREAT because this way I am REALLY learning the concepts of AJAX, JSON, etc...
This plugin has a search filter that I found very interesting... the question I have is regarding this.(Already found a solution... at the end of the post).
The plugin send a $POST to the server with the value the user want to search.
In my object query I will use the like() method to find the objects that have that value in its data.
The problem is that I can only check one of its column at a time using the like()...
Code:
$obj = new Datatable();
//Check if a post with search data exists
if($this->input->post('sSearch'))
{
$obj->like('engine', $this->input->post('sSearch'));
$obj->or_like('browser', $this->input->post('sSearch'));
$obj->or_like('platform', $this->input->post('sSearch'));
$obj->or_like('version', $this->input->post('sSearch'));
$obj->or_like('grade', $this->input->post('sSearch'));
}
//Execute the query
$obj->get();
Is there a better way to perform this search ?
EDIT: Just found a solution myself. I created a array with the columns of the table and made a foreach loop. I had to do this because of the next feature of datatables, witch is sorting multiple columns.