PDA

View Full Version : Custom Browse or Search Trigger field similar to paging toolbar



mihaip007
6 Jul 2010, 12:12 PM
Hi..!
I have attached an image to show in simple terms what I am trying to achieve.
Is there any extension or anything similar to my image that I could use that anyone might know of?

Basically, I want to be able to click next, previous, last, first in order to browse through a set of records. Or click on the search button to pop-up a window which takes my text entered in the textfield box and uses it as a parameter to search records further on (but that is my future baby hehehe)

And finally the "new" button to clear the text field and add a marker to mention that the new record is blank and new...!

It looks very similar to the pagingtoolbar, but slightly different...!

Any help would be greatly appreciated...


Thanks
Mihai

Animal
6 Jul 2010, 12:34 PM
THat's a PagingToolbar with some extra stuff inserted.

mihaip007
6 Jul 2010, 12:48 PM
Hi Animal..!

Thanks for the reply! So here is what I tried, but I cannot find the next thing to make it work:


var SearchBar = new Ext.PagingToolbar({
//store: myStore, // grid and PagingToolbar using same store
afterPageText :'',
beforePageText :'' ,
boxMinWidth: 120,
displayInfo: false,

pageSize: 1,
prependButtons: false,
items: [
{
icon: './images/search.png', // icons can also be specified inline
cls: 'x-btn-icon',
tooltip: '<b>Search</b><br/>Search for a document'
},
{
icon: '../ext/examples/shared/icons/fam/add.png', // icons can also be specified inline
cls: 'x-btn-icon',
tooltip: '<b>New</b><br/>Create a new document'
}
]
});
SearchBar.refresh.hideParent = true;
SearchBar.refresh.hide();


The problem I have is that the textfield where you normally place the page number only allows numbers; I need a string there...! And lastly - how do you change the width on this textfield?

Any help would be greatly appreciated...
Thanks
Mihai