PDA

View Full Version : [SOLVED] EditorGridPanel & Click behaviour



truijllo
30 Nov 2009, 4:17 AM
Hi !
I'm looking for an easy way to emulate the text input behaviour when the click event happens.

In other words... In a text input ( even in a combo ) I can set a default string which desappears when I click over, I have a grid with only 1 editable column and I wonder how can I obtain same results.

A possible solution is with listeners but I think ( hope ) there are easier ( cleaner ) ways to do it :)



the solution is in this code:


{ header: 'How many? *', width: 30, sortable: true, dataIndex: 'towork' ,
editor: new fm.NumberField({
allowBlank: false,
allowNegative: false,
allowDecimals: false,
maxValue: 100000,
minValue: 0,
listeners: { focus: function(cell){
cell.setRawValue('');
}
}

}