GridView show sum of columns in footer
The scenario in which this wiki can be useful is when you have to send an (huge) array of model ids and perform a time consuming computation with it like linking every model to other models. The idea is to split the array into smaller arrays and perform sequential ajax requests, showing the calculation progress using a [Bootstrap Progress bar](https://www.yiiframework.com/extension/yiisoft/yii2-bo...
Following is the table structure
CREATE TABLE IF NOT EXISTS `tblgroups` ( `id` int(11) NOT NULL, `groupname` varchar(150) NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive', `date` datetime NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.
This wiki explains how to add calculated fields into your Yii Framework 2.0 gridview with filtering and sorting.