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 #16

Open
ThaDafinser opened this issue Aug 28, 2017 · 5 comments
Open

jqGrid: Custom-Filtering #16

ThaDafinser opened this issue Aug 28, 2017 · 5 comments

Comments

@ThaDafinser
Copy link
Contributor

From @creifferscheid on June 30, 2014 9:15

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?

Copied from original issue: ThaDafinser/ZfcDatagrid#123

@ThaDafinser
Copy link
Contributor Author

From @webdevilopers on June 30, 2014 9:37

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!

@ThaDafinser
Copy link
Contributor Author

From @hikaru-shindo on June 30, 2014 9:48

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.

@ThaDafinser
Copy link
Contributor Author

From @creifferscheid on June 30, 2014 16:56

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
Contributor Author

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

popovserhii added a commit to popovserhii/zfc-datagrid that referenced this issue Apr 4, 2018
popovserhii added a commit to popovserhii/zfc-datagrid that referenced this issue Apr 4, 2018
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

1 participant