Hello,

I've searched and couldn't find a solution for my problem. I'm trying to remove a field whenever a new row is selected on another gridPanel, but the label always remains there. This is what I have, using ExtJS 2.0.2:

Code:
var dateField = {xtype:'datefield',
			fieldLabel:'Date',
			name:'date',
			id:'date_field'
}

availablePredicatesGrid.getSelectionModel().on('rowselect', function(sm,_rowIndex,_rule){
	predicatesForm.getForm().loadRecord(_rule);
	var _ruleType= _rule.store.getAt(_rowIndex).get('type');

	predicateArguments.remove('date_field');
	predicateArguments.doLayout();
	
	for(i=0; i<_ruleType.length; i++){
		if(_ruleType[i]=='date'){
			predicateArguments.add(dateField);
			predicateArguments.doLayout();
		}
		else if(_ruleType[i]=='number'){
			predicateArguments.add(numberField);
			predicateArguments.doLayout();
		}
	}
});
How do remove the label too?

PS: it looks like the "preview post" button posts the thread instead of previewing it... Can the mods delete the previous post?