Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jqGrid: Custom-Filtering #123

Closed
creifferscheid opened this issue Jun 30, 2014 · 6 comments
Closed

jqGrid: Custom-Filtering #123

creifferscheid opened this issue Jun 30, 2014 · 6 comments

Comments

@creifferscheid
Copy link

Hey,
thanks for the great bundle, but I got stuck with a small bug?!

We want to use the jqGrid multipleSearch - function:

multipleSearch:true,
multipleGroup:true

But it doesn't work because the POST is different to a normal search-operation.
This is a piece of POST Data using the multipleSearch-filtering

isSearch: true
filters:{"groupOp":"AND","rules":[{"field":"title","op":"cn","data":"ff"}]}
searchField:
searchString:
searchOper:

And for the simple Search

isSearch:true
title:fff

I think there's an error in the Renderer?

@webdevilopers
Copy link
Contributor

I think not all jqGrid options are yet implemented. You can create a custom template and add the options there see issue #106 :

$grid->getRenderer()->setTemplate('indexgrid');
return $grid;

There is a custom template I added for the groupingView option in PR #118 .

Hope this helps!

@hikaru-shindo
Copy link

The problem seems not to be the layout but that the filters are not applied because the POST structure of jqGrid is different. I think one would need to change the renderer class a bit to get the advanced filters from the POST.

@creifferscheid
Copy link
Author

I guess the problem is in the jqGrid renderer getFilters() function. There is no uniqueId for the columns posted.

if ($request->getPost($column->getUniqueId()) != '') {
...
}

Maybe @ThaDafinser can verify this?

@ThaDafinser
Copy link
Owner

This is currently not supported.
See filtering for this renderer, you could adjust it there for groupSearch
https://github.com/ThaDafinser/ZfcDatagrid/blob/master/src/ZfcDatagrid/Renderer/JqGrid/Renderer.php#L101-L140

BUT
All datasources are currently only using AND operator:
https://github.com/ThaDafinser/ZfcDatagrid/blob/master/src/ZfcDatagrid/DataSource/Doctrine2/Filter.php#L133-L137

So this would be a bigger refactoring

@ThaDafinser
Copy link
Owner

This issue was moved to zfc-datagrid/zfc-datagrid#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants