var summary = new Ext.grid.GroupSummary();
var flightresults = new Kwf.Auto.GridPanel({
controllerUrl : '/flightresults',
region : 'south',
height : 200,
resizable : true,
split : true,
collapsible : true,
gridConfig : {
plugins: summary
},
title : trlKwf('Flight results')
});
#protected $_grouping = array('groupField' => 'typeId');
to the controller class app hangs on loading...
var summary = new Ext.grid.GroupSummary();
var results = new Kwf.Auto.GridPanel({
controllerUrl : '/results',
region : 'south',
height : 200,
resizable : true,
split : true,
collapsible : true,
gridConfig : {
plugins: summary
},
columnsConfig: {
colname: {
summaryType: 'sum',
summaryRenderer: function(v)
{
return v;
}
}
},
title : trl('Results')
});
public function setSummaryType($summaryType)
{
$ret = $this->setProperty('summaryType', $summaryType);
return $ret;
}
public function setSummaryRenderer($rendererType)
{
$ret = $this->setProperty('summaryRenderer', $rendererType);
return $ret;
}
2. In custom controller php class define as following:
protected $_grouping = array('groupField' => 'planeName');
protected function _initColumns()
{
$this->_filters = array('text' => array('type' => 'TextField'));
$this->_columns->add(new Kwf_Grid_Column('resultTime', trl('Time')))
->setSummaryType('totalTime');
}
3. In the corresponding js add following:
// define a custom summary function
Ext.grid.GroupSummary.Calculations['resultTime'] = function(v, record, field)
{
return //some calculation
}
4. And following into dependencies:
Admin.dep[] = ExtGroupingGrid
Admin.dep[] = ExtGridSummary
Thanks.
--
You received this message because you are subscribed to the Google Groups "Koala Framework Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to koala-framework...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.