PDA

View Full Version : customize extjs paging bar



prajeesh_bs
17 Jun 2011, 1:53 AM
i have a dataview and i am showing some images inside it. Now i am doing pagination for the dataview. I dont need the default paging bar using extjs. What i need is a customised one. That is there will be an icon for showing previos page on the left side of dataview and an icon indicating next page on the right page. Is it possible to customize the paging bar in this way?

skirtle
17 Jun 2011, 5:23 PM
I wouldn't try to customize the paging toolbar for what you're describing, it'd be too complicated to render it. From looking at the source (http://dev.sencha.com/deploy/ext-3.4.0/docs/source/PagingToolbar.html) you should be able to figure out how to write your own. Largely it will just involve keeping track of the current page number and calling store.load() with suitable parameters when your icons are clicked.

I suggest that you consider writing one class to handle the page management and then render the icons as 2 separate components that use your page manager. This is effectively what Ext 4 does by moving paging logic out of the toolbar and into the store.

prajeesh_bs
20 Jun 2011, 12:35 AM
thanks Skirtle,
I will give a try this week..