Page 1 of 1

[INFO REQ] PagingToolbar in bbar with additional buttons

Posted: Sun Jun 13, 2021 10:38 am
by Mercury

According to your docs the config entry bbar accepts Object[]/Object. I have a tbar with a PagingToolbar Object (just like in your example) which works fine. Now I tried to extend that toolbar by passing in an array of objects instead of just the pagingtoolbar object. But when when doing that the PagingToolbar functionality is no longer available ("Page _ of 0 / No records available"). Is it possible to have have additional buttons next to a paging toolbar?


Re: [INFO REQ] PagingToolbar in bbar with additional buttons

Posted: Sun Jun 13, 2021 12:31 pm
by mats

How do you configure the bbar? Just providing an array of buttons won't let the Grid know about the toolbar type you want.

Try:

    bbar : {
        type  : 'pagingtoolbar',
        items : {
            click : { text : 'Click me' }
        }
    }

Re: [INFO REQ] PagingToolbar in bbar with additional buttons

Posted: Mon Jun 14, 2021 8:46 am
by Mercury

Thank you Mats for the code snippet. That works for me! My non-working approach (while assuming that I need to provide an array) looked like this:

bbar: [{
    type: 'pagingtoolbar'
},
{
    type: 'button',
    text: 'clickme'
}]