PDA

View Full Version : Missing field convert in Ext Designer



caroman
24 Oct 2010, 6:42 AM
Hi,
I am creating a Store with the Designer and I didn't find the convert option for the field.
Is there any work around since the Store.js generated by the Designer can not be edited.

jarrednicholls
25 Oct 2010, 4:58 AM
Hi caroman,

The Designer doesn't support "function" type configurations. You can add a convert function to your field after it has been instantiated.



// one of the ways to get the store reference
var store = Ext.StoreMgr.lookup('MyStoreId');

// Get field by its name, assign custom convert function to it
store.fields.get('myFieldName').convert = function(value, record) { ... };

caroman
26 Oct 2010, 6:19 PM
thanks