A
A
ANTVirGEO2015-08-21 12:42:44
Yii
ANTVirGEO, 2015-08-21 12:42:44

Kartik GridView how to create two Summary fields?

Good afternoon!
I use the Kartik widget to display the table. I want to display 2 rows with the total values ​​of the fields I need before the main table.
_________________________________
| Total | Apple | 130r |
| Total | orange | 100r |
_________________________________
|11.08.2015 | Apple | 50r |
|11.08.2015 | Orange |60r |
|12.08.2015 | Apple |80r |
|12.08.2015 | Orange |40r |
_________________________________
It was not difficult to deduce one line on the docks of Kartik . But to make two lines in a row with the withdrawal of totals - does not work. Maybe someone has already encountered a similar problem?
___
Or such an option. We drop the Summary and pass two arrays of data for our two rows to the View using beforeHeader and afterHeader.
This is almost what is needed. But how then to use afterHeader twice?
___
Eeeee. How to place beforeHeader after header? So that he stands next to afterHeader)
___
Or. How to move the Summary total display from the bottom of the table to the top? Then it will be possible to display one total in Summary, and the other in afterHeader. This option is also suitable)
___
PS: I made it in one line in afterHeader simply outputting data in a row through
. K- crutch

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question