3

I have combobox with remote store in the gridpanel editor cell (I use rowEditing plugin). With using a "pageSize" properties of combobox I have pagingtoolbar at the bottom of expanded combobox.

example: http://docs.sencha.com/extjs/4.2.2/#!/example/form/forum-search.html

But I need to change some properties of this pagingtoolbar, for example "beforePageText", "afterPageText", "displayMsg" and so on. In the gridpanel I can add dockedItems and set any property, but what about combobox? There is no config for it.

Thanks for all replies and help.

var store = Ext.create('Ext.data.ArrayStore', {
                        fields: ['ID', 'NAME'],
                        pageSize: 10,
                        autoLoad: false,
                        proxy: {
                            type: 'ajax',
                            url: 'someurl'
                            reader: {
                                type: 'json',
                                root: 'data'
                            }
                        }
                    });

//And properties of my column editor

gridColumn.editor.xtype = 'combobox';
gridColumn.editor.store = store;
//with this we have pagingtoolbar at the bottom of combobox
gridColumn.editor.pageSize = 20;
gridColumn.editor.valueField = 'ID';
gridColumn.editor.displayField = 'ID';
4

1 回答 1

3

Unfortunately, configuration of the paging toolbar is not easily possible. The paging is created as a part of BoundList creation (that is Combo picker) and no config options are honored. See BoundList source:

createPagingToolbar: function() {
    return Ext.widget('pagingtoolbar', {
        id: this.id + '-paging-toolbar',
        pageSize: this.pageSize,
        store: this.dataSource,
        border: false,
        ownerCt: this,
        ownerLayout: this.getComponentLayout()
    });
}

You could configure your own picker on the combo but it is not documented config option or you could override createPicker() method - also not documented.

于 2014-06-23T17:05:10.833 回答