PDA

View Full Version : Binding base params



rickrod99
26 May 2011, 10:57 AM
Guys, I am new to sencha. So I am just getting started with development work. I was wondering if you could provide some assistance.

I have a paging grid that onload displays data. I have a form that popsup to modify the search for the grid. The form has 5 textfields on them. How can I bind those params to the grid as base params? When I say params I am referring to the textfields on the form.

friend
26 May 2011, 11:03 AM
Note that empty form fields will not emit an attribute/value when getValues() is called.



var baseParams = yourForm.getForm().getValues();
yourStore.baseParams = baseParams;

rickrod99
26 May 2011, 11:07 AM
So basically you are only getting attribute/value for fields that were actually filled out?

friend
26 May 2011, 11:19 AM
Oops.. wait. Sorry, all attribute/value pairs are returned. My bad...

rickrod99
26 May 2011, 11:23 AM
Thank you, that worked great.