Closed
Description
In Yii1 if the column is not specified in DataProvider, there will not be any filter and we could not sort the table based on this column as well.
example. we have a column called Subtotal in Quotation_Item gridview.
it may looks like this
array(
'header'=>'Subtotal',
'value'=>'$data->getSubtotal()',
'footer'=>'Total: '.$model->total,
),
But how about we add some variable like compare and filter
E.g.
array(
'header'=>'Subtotal',
'filter'=>'number',
'compare' => 'number'
'value'=>'$data->getSubtotal()',
'footer'=>'Total: '.$model->total,
),
I post it here, so that i think that may be a sweet improvement in Yii2. Feel free to correct me, if i said anything wrong. Or we can implement a similar outcome by make some modification in Model instead of View?
I am apologized for my poor English.