PDA

View Full Version : how to startEdit on grid with editor (ext 4.0.7)



Webtel
22 Dec 2011, 5:15 AM
How should i start editing a grid with celledit? in following example i get as you see :

<div unselectable="on" class="x-grid-cell-inner x-unselectable" style="; text-align: left;">1</div>
instead of just"1".


var g = GRID;
var s = g.getStore();


var user_edu = Ext.create('TS.model.UserEducation',{
user_education_id:null,
user_education_user_id:1,
user_education_school:1,// '1' gives same result.
user_education_department:null,
user_education_type:null,
user_education_date_start:null,
user_education_status_id:null
});


var p = g.getPlugin('edit');
p.completeEdit();
s.insert(0,[user_edu]);
g.getView().refresh();
g.getSelectionModel().select(0);
p.startEdit(user_edu,1);


after blur and focus it goes 1 again. so the problem is just in startEdit i guess....

30247

mitchellsimoens
22 Dec 2011, 11:56 AM
hmm... looks like a bug. Have you tried


cellEditing.startEditByPosition({row: 0, column: 1});

It takes index for row and column and it didn't behave like startEdit did in 4.0.7.

Just tried startEdit in 4.1.0 beta and it isn't showing the html in there so it looks like the problem is fixed.

Webtel
23 Dec 2011, 12:14 AM
Thanks in plenty! that works fine with0.7. cant wait to get 4.1.
Best regards.