PDA

View Full Version : How to use getById? [ExtJS 4.1]



darkhorni
20 Jun 2012, 12:50 AM
I want to get the raw value of a numberfield by looking up its id (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.dom.AbstractElement-method-getById). Here the raw value is 4 and the id of the numberfield (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.form.field.Number-cfg-id) is satirSayisi.

36360

I have tried several combinations but non has worked.

grid.header.getById('satirSayisi').getRawValue()

sword-it
20 Jun 2012, 3:45 AM
Hi!



satirSayisi is your numberfield's id or container's id (parent of numberfield).


if it is correct....you should check what you are getting in grid.header in console.

and for the getById, for example:-

myForm.getById('saveField').getValue(); will searches for element which has id 'saveField' in my form and returns me its value.

For detailed clarification on getById, plz refer

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.dom.AbstractElement-method-getById