SAN
SAN

Reputation: 2247

clear text in extjs textfield

I am using extjs textfield in one of the grids in a webpage. This is how i have created the textfield

{
            xtype: 'textfield',
            id: 'logicrelation',
            allowBlank: true
}

I want to clear this textfield in one of the handlers. I tried clearing it like this, Ext.get('logicrelation').setValue(""); but I get a message in the console that the setValue function is not available. I tried reset function also and that did not help either. Appreciate your help

Thanks, Sandeep

Upvotes: 3

Views: 15174

Answers (1)

wombleton
wombleton

Reputation: 8376

Ext.get returns Ext.Elements.

You are looking for Ext.getCmp.

Upvotes: 8

Related Questions