PDA

View Full Version : EditorGrid beforeedit



blackbumer
23 Feb 2011, 6:21 AM
Hello everyone
i stick with such problem:
each editable column has value in store like patern "id:value"
to render it i use


function(value, a, r, ri, ci, st){
if (value) {
var av = value.split(':');
if (av.length == 2) {return av[1];} else { return value;}
} else { return value;}
}


i hide first part of value(id)
but how to make same thing when i try edit it?
i tried assign value to object inside beforeedit event of EditorGridPanel
but it show full value of column anyway...

http://www.sencha.com/forum/attachment.php?attachmentid=24809

Condor
23 Feb 2011, 6:33 AM
The only way to do that is by overriding preEditValue and postEditValue methods of the EditorGridPanel.

blackbumer
23 Feb 2011, 4:20 PM
The only way to do that is by overriding preEditValue and postEditValue methods of the EditorGridPanel.

Thanks, this helped me out