mercredi 9 avril 2014

store.removeAll() error on 4.2.1 but works fine on 4.1.1

There is a fiddle showing this at http://ift.tt/1krYt2H , if you run under 4.2.1 it has a problem that doesn't occur under 4.1.1.



How it is to work:

I have a grid with grouping. I have attached a group context menu which has a choice of 'Edit'. When Edit is clicked (calls getRec()) a form is displayed that has another grid (editable) which has all the detail of the transaction. I add a couple of blank rows to this grid in case items need to be added. Within this procedure getRec() I use store.removeAll() on the store that the editable detail grid is tied to, then I add the detail for this record and the blank rows.



The problem:

If you right click a group and choose Edit, then click inside one of the cells of the 'added blank rows' (in my example row 2 or more as the detail always has only one row). Leave the cursor in that position. Then click 'Cancel'. Then right click and choose Edit again - on the Console I get 'Uncaught TypeError: Cannot call method 'getId' of undefined on line 126070 of ext-all-debug.js which is inside onViewRefresh(). I have tracked back that this is inside my call to store.removeAll(). You will notice when the error happens the screen is never unmasked as it doesn't get to that line in the script.



If you click in Row 2 then click back in Row 1 before doing 'Cancel' then the error does not occur, only when the cursor has been left in one of the added 'blank' rows. If you run this under 4.1.1 there is no error either.



This is confusing to explain so hope I have made clear enough, maybe by looking at the fiddle it will make enough sense.



Thanks,



Scott




Aucun commentaire:

Enregistrer un commentaire