PDA

View Full Version : singleSelect in CheckboxSelectionModel doesn't work with newly inserted rows



sandeep45
31 Jan 2011, 3:20 PM
I have singleSelect: true in my selection model which unchecks a row when i select a new row. When i insert a new row to the grid and save it, the single select feature does not work on my new row. Clicking on other rows do no uncheck the new row. I have verified that when the row is saved the backend is returning a unique id for the newly created row.

sandeep45
1 Feb 2011, 5:33 AM
I also notice that singleSelect feature is lost with other selection models as well when a row is inserted and saved. I also notice that the feature is lost after the new row is saved. I am using the following temporary fix:

rowclick : function(g, ri, e){
g.getSelectionModel().deselectRange(0,g.store.getCount());
g.getSelectionModel().selectRow(ri,false);
}

Condor
1 Feb 2011, 5:38 AM
See here (http://www.sencha.com/forum/showthread.php?117750-OPEN-1468-3.3-Ext.grid.CheckboxSelectionModel-and-singleSelect-false).

sandeep45
1 Feb 2011, 5:56 AM
My issue is not with the control key, but with when i add/insert a new row to the grid's store and then save it. This is when I loose the singleSelect behavior for the newly added row.

Condor
1 Feb 2011, 5:59 AM
Completely correct. That's not the same problem.

I did make the same patch for CheckColumn (see here (http://www.sencha.com/forum/showthread.php?85455-SingleSelectCheckColumn)).

sandeep45
1 Feb 2011, 8:35 AM
so are you saying that this is a bug with ext and i need to use the extended selection model you have defined.

anyways i tried it and now i am getting errors in ext-all-debug.js with sp.prototype being undefined.