PDA

View Full Version : this is grid plugin?a combobox select grid page rows



zhengeili
25 Mar 2014, 6:35 PM
48454has a plugin for ExtJs4 Grid?

Farish
26 Mar 2014, 12:07 AM
I dont know if such a plugin already exists but you can extend the paging toolbar component and add the combobox there:


Ext.create('Ext.PagingToolbar', {
store: gridStore,
displayInfo: true,
displayMsg: ' {0} - {1} of {2}',
items:
[
{xtype: 'tbseparator'},
{
xtype:'combo',
id: 'pagingSize_store',
name: 'pagingSize_store',
width: 70,
store: store_pageSize,
allowBlank: true,
displayField: 'value',
valueField: 'value',
value: '25',
queryMode: 'local',
editable: false,
forceSelection: true,
pickerOffset: [0, OFFSET_Y_COMBO],
listeners:
{
select: function(combo, records, eOpts)
{
var value = records[0].data.value;
gridStore.pageSize = value;
gridStore.loadPage(1); // load first page after page size has been changed
}
}
}
]
});