My VALUE column is:
[
'attribute' => 'value',
'format' => 'raw',
'contentOptions'=>['style'=>'width: 10%;text-align:left'],
'footer' => ???
],
How use totals of rows on FOOTER property ?
My VALUE column is:
[
'attribute' => 'value',
'format' => 'raw',
'contentOptions'=>['style'=>'width: 10%;text-align:left'],
'footer' => ???
],
How use totals of rows on FOOTER property ?
I have not tried this but try defining the column like this.
On the top of the file define
Afterwards define the column like this:
Now there are several problems with this as they are with the http://demos.krajee.com/grid meaning it will only add what it is shown, if you have pagination it will just show the total on that page.
If you want a total for all the records you should add it by hand using the dataprovider without pagination.
Again I have not really tried this, just give it a shot.
it's works 1. create class then 2.create column array, 3.configure column, 4.configure grid
i try as you say but show me the error: trim() expects parameter 1 to be string, object given
In Yii 1 works fine, i just create this function in Model
And in View, this way in footer property:
in the view file above calculate the footer sum by following code
now in your gridview use just pass the amount variable as follow
i have tried it will work...