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

cellAttributes fix for #107, individual layout template fix for #106 #112

Closed
wants to merge 7 commits into from

Conversation

webdevilopers
Copy link
Contributor

Sorry for putting both fixes in one PR. I'm new to github usage for multiple PRs.
I guess it's best practice start a separate branches named patch-X, right?

Fix 1 adds the following valid cellAttributes to the column renderer:

  • sorttype
  • summaryType
  • summaryTpl

Though valid strings are defined their validation is not implemented yet.

These callattr quickly allow the user to use jqgrid's summary feature on the footerrow.
See Grouping -> Summary Footers here: http://trirand.com/blog/jqgrid/jqgrid.html

Still groupingView parameters have to be added to the jqgrid templatee.g.:

javascript
grouping:true, groupingView : { groupField : ['name'], groupSummary : [true], groupColumnShow : [true], groupText : ['{0}'], groupCollapse : false, groupOrder: ['asc'] },


A quick fix to issue https://github.com/ThaDafinser/ZfcDatagrid/issues/107 .

Fix 2 allows the user to set an individual layout directely on the `DataGrid`:

``` php
$grid = $this->getServiceLocator()->get('ZfcDatagrid\Datagrid');
$grid->setTemplate('application/index/list');

Getting valid CellAttributes from $rendererParameters. Valid CellAttributes defined but validation not implemented yet.
@webdevilopers webdevilopers changed the title Added cellAtributes on jqGrid column renderer fixes #107 cellAttributes fix for #107, individual layout template fix for #106 May 27, 2014
@webdevilopers
Copy link
Contributor Author

@ThaDafinser If you can confirm that the following issue is the official way to set an individual layout
#106
then you can close this PR and I will create a new separate patch for the cellAttributes fix.

@ThaDafinser
Copy link
Owner

You can set custom templates with this line

$grid->getRenderer()->setTemplate('your-template')

It must be set for each renderer, since each renderer has its own template

@webdevilopers integrating custom grouping for only one renderer is not good, since we need at least export support for it

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

Successfully merging this pull request may close these issues.

None yet

2 participants