items: [
{
xtype: 'grid',
id : currGroupGrid,
alias: 'widget.currGroupGrid',
height : 175,
width : 180,
stripeRows : false,
columnLines: true,
store: 'currency.CurrencyGroupingStore',
margin : '3 3 3 3',
columns: [
{header: 'Currency', dataIndex: 'currencyCode', flex: 1,sortable:true,hideable:false} //this column has blank spaces
],
features: [
{
ftype: 'grouping',
groupHeaderTpl: '{name} {[values.rows.length > 1 ? "("+values.rows.length+")" : ""]}',
hideGroupedHeader: false,
startCollapsed: false
}
],
viewConfig: {
stripeRows : false,
getRowClass: function(record, index) {
//set appropriate css
debugger;
if (record.data.type == 'ADD'){
return 'newLineItem'; //'newLineItem';
}
}
}
}
Ext.define('CustomerRep.store.currency.CurrencyGroupingStore', {
id : 'currencyGroupingStore',
extend: 'Ext.data.Store',
model: 'CustomerRep.model.currency.CurrencyGroupingModel', //CurrencyGroupingModel contains currencyCode and currencyGroup
alias: 'widget.currencyGroupingStore',
autoLoad : false,
groupers: ['currencyGroup'], //grouping done on currencyGroup
pageSize : 500,
proxy: {
type: 'ajax',
url: 'getcurrencyGroupingData.controller',
method:'GET',
reader: {
type : 'json',
root : 'data',
totalProperty : 'total',
successProperty: 'success'
}
}
});
Example or source required to say more.