You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getter methods get their values from \ZfcDatagrid\Column\AbstractColumn.
It would make no sense to add jqgrid typical options like summaryType there.
Extending the abstract class to define a jqgrid Column would be possible.
But using a global setOptions methods maybe is a smarter solution. And the use the view helper to set an array with "allowed" values.
/** * Cellattr */$rendererParameters = $column->getRendererParameters('jqGrid');
if (isset($rendererParameters['cellattr'])) {
$options['cellattr'] = (string) $rendererParameters['cellattr'];
}
if (isset($rendererParameters['summaryType'])) {
$options['summaryType'] = (string) $rendererParameters['summaryType'];
}
if (isset($rendererParameters['summaryTpl'])) {
$options['summaryTpl'] = (string) $rendererParameters['summaryTpl'];
}
Should we add an array of possible options to set for the cellattr and add a method for setCellAttributes() and addCellAttributes instead of using the $rendererParameters?
The text was updated successfully, but these errors were encountered:
This issue is based on issue #102.
A common jqGrid feature is using footerrow and setting footerData to add totals to the grid.
Unfortunately I could not append any javascript to the grid to add this after the grid was generated.
Same for using grouping for summary. The following demo requires setting attributes summaryType and summaryTpl on columns:
http://trirand.com/blog/jqgrid/jqgrid.html
Of course creating your own template is a possible workaround. But mostly for only this one use case.
The jqGrid Columns view helper already has the possibility to set options:
https://github.com/ThaDafinser/ZfcDatagrid/blob/master/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php#L86-95
The getter methods get their values from \ZfcDatagrid\Column\AbstractColumn.
It would make no sense to add jqgrid typical options like summaryType there.
Extending the abstract class to define a jqgrid Column would be possible.
But using a global setOptions methods maybe is a smarter solution. And the use the view helper to set an array with "allowed" values.
Another workaround is adding options to the cellattr:
https://github.com/ThaDafinser/ZfcDatagrid/blob/master/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php#L109-115
Should we add an array of possible options to set for the cellattr and add a method for setCellAttributes() and addCellAttributes instead of using the $rendererParameters?
The text was updated successfully, but these errors were encountered: