PDA

View Full Version : How to bind textfield to store



darwin_e
12 Dec 2012, 8:02 AM
Hi,
I am pretty much new to ext js and practically not an expert on JS. I've worked with windows forms for most of my project

Anyway, i need to know the best approach of binding the text field to a store so that when i navigate through the store (using the pagingtoolbar), the field values gets displayed to.

To give you a better idea, let me show you my form:
40771

Thanks.

mitchellsimoens
14 Dec 2012, 6:18 AM
You will need to extend Text field or make a plugin as there is no built in support for this.

slemmon
14 Dec 2012, 10:03 AM
What if you set the pageSize on the store to 1 and then listened to the change event on the paging toolbar and used the page number to do something like:



change: function (tb, pageData) {
var rec = tb.getStore().getAt(pagingData.toRecord);
myForm.loadRecord(rec);
}

varsos
14 Dec 2012, 1:49 PM
Use combo and hide trigger.

catstiger
5 Jan 2013, 6:41 PM
Bind fields value in the beforeload event.