PDA

View Full Version : button underneath list component



macs
23 Apr 2012, 6:06 AM
i have a 'Ext.dataview.List' that i populate with data from a store. i also would like to add buttons underneath the list for the purpose of a next/previous page navigation. now when i add the buttons to the items config of the list, they appear on top of the list. However, i would like them to be below the list. i do not want them to be docked though, but scrolling with the content. O know i could wrapp the list in another panel and add the button below the list item. but when i can add one above the list without using another panel there should be a way to add one below it. somehow i am not able to find the answer. would anyone be so kind and point me in the right direction?

mitchellsimoens
25 Apr 2012, 5:16 AM
For simplicity you could wrap the list in a container, allow the container to scroll and the list not to scroll. Add the buttons after the list in the items config of the container.

macs
26 Apr 2012, 1:31 AM
thanks a lot mitchell for you reply. yes i was also thinking along those lines. however, i thought that adding a container to add a button seems not the most straightforward solution. what i did and what worked for me now was that i bound a listener to the initialize event of the listview and than add the button after the event fires. this way the button also appears below the list. i am not sure what the more optimal solution is, but i would be glad to hear.