PDA

View Full Version : EditorGridPanel: Problem with cell edit



Sendell
13 Dec 2010, 6:22 AM
Hi folks,
I've a problem that I can't resolve because I don't know what generates it.

My editorgrid has a selModel set as new rowselectionmodel and editClick set to 1.
When I finish of to edit a cell, and I click on another cell, new cell editor is showed, but after a moment, it goes away, and I must re-select the same cell.

This happen often, but not always...

I've try to remove all my code, but the problem remains...

If I try to debug step by step, the problem doesn't come...
Can anyone help me? or put me on the right way??

thanks a lot

Screamy
13 Dec 2010, 7:02 AM
I think it's a problem with your event listener configuration at line 148 of your code sample.

Oh, wait... you didn't provide any code to look at...

;)

Sendell
13 Dec 2010, 7:13 AM
ehmmmm... ok.... this is the code ^_^
I've not post it because is very very simple....

my grid config


var grid = {
store: dataStore,
cm: colModel,
clicksToEdit: 0,
selModel: new Ext.grid.RowSelectionModel(selModel),
enableColumnMove: false,
loadMask: true,
enableColumnMove: true,
clickToEdit: 1,
view: new Ext.grid.GridView({
focusRow : Ext.emptyFn,
focusCell : Ext.emptyFn,
ensureVisible: Ext.emptyFn,
listeners: {
refresh: function (view) {}
}
}),
viewConfig: {
getEditorParent: function() {
return this.mainWrap.dom;
}
},
tbar: new Ext.PagingToolbar({
store: dataStore,
displayInfo: true,
pageSize: MAX_RECORDS_PER_PAGE
})
};


where selModel is this object:


var selModel = {
singleSelect: true,
moveEditorOnEnter: false
};


and the last step:


var newGrid = new Ext.grid.EditorGridPanel(grid);


listeners are not used ( i've deleted them.... )

thanks :D

Screamy
13 Dec 2010, 7:51 AM
As diagnostic steps:


Comment out the custom view declared in your grid config. It's doesn't appear to being doing anything constructive.
Declare your RowSelectionModel inline and drop the moveEditorOnEnter attribute:

selModel: new Ext.grid.RowSelectionModel({singleSelect: true})
You have enableColumnMove: true and enableColumnMove: false in your grid config. Remove one of them.

Sendell
13 Dec 2010, 7:58 AM
Hi Screamy...

1. my custom view is very important, I've copied it from this forum. Its is useful for fix a bug. Without it every time that an user click on a row, the h-scrollbar return to first column....

ok... I go to test your advices... for now thanks! :D

Sendell
13 Dec 2010, 8:09 AM
:( nothing....

the problem remains...
Is like if there is a sync problem between the end of first editing and the start of second one...

with cellSelectionModel this doesn't happen...

strange... very very strange...

I'll try to discovery some example about cellEditing&RowSelectionModel on the net, in order to see if this is only a my problem....

Screamy
13 Dec 2010, 10:27 AM
Is the issue browser specific? (FF vs. IE)

What version of Ext are you using?

Also, can you post the entire, functional block of code (don't remove any listeners or otherwise alter the code)?

Sendell
13 Dec 2010, 11:00 AM
I get this problem on FF, IE 7, IE 8 and chrome....
so .. evrywhere I've tried :)

I use le last version of ext ( I think ) Ext 3.1.0 ....

mmmm I've no problem to show all code, the problem is that some listeners came from php server, ad I apply them to my grid with the command Ext.applyIf(grid, {listeners: config.listeners});

so.. I've delete Ext.apply (...) .. . tomorrow when I'll to be in office, I can post rowSelect event ( the only event used ) ...

Thanks again for your aids...