zyto
17 Sep 2012, 6:11 AM
I try to use Grid, and find not convenient thing for me: I can't change value when user entered in editing mode.
i.e. i have column:
id:'cost', header:'Статья затрат',
dataIndex:'cost_id',
flex:5,
editor : {
xtype : 'combobox',
store : costsStore,
fieldLabel : '',
valueField : 'id',
forceSelection : false,
displayField : 'name',
name : 'cost_id',
minChars : 0,
allowBlank : true
}, renderer : function(value, meta, record) {
var catStore = costsStore;
ind = catStore.find('id', value);
elem = catStore.getAt(ind);
if (!elem) return '';
//return elem.data['name']+" "+value;
return value+" "+elem.data['name'].replace(/\ \;/g,"\xa0").replace(/^\s+|\s+$/g,"");
}
In values there are strings like:
' MyString', and I'd like to delete ' ', but delete them only from edit box, but not from list.
screen:
38741
i.e. i have column:
id:'cost', header:'Статья затрат',
dataIndex:'cost_id',
flex:5,
editor : {
xtype : 'combobox',
store : costsStore,
fieldLabel : '',
valueField : 'id',
forceSelection : false,
displayField : 'name',
name : 'cost_id',
minChars : 0,
allowBlank : true
}, renderer : function(value, meta, record) {
var catStore = costsStore;
ind = catStore.find('id', value);
elem = catStore.getAt(ind);
if (!elem) return '';
//return elem.data['name']+" "+value;
return value+" "+elem.data['name'].replace(/\ \;/g,"\xa0").replace(/^\s+|\s+$/g,"");
}
In values there are strings like:
' MyString', and I'd like to delete ' ', but delete them only from edit box, but not from list.
screen:
38741