1. #1
    Ext User
    Join Date
    Oct 2009
    Location
    Italy
    Posts
    16
    Vote Rating
    0
    callipigia is on a distinguished road

      0  

    Default Editing grid: issue on selecting rows after record insertion

    Editing grid: issue on selecting rows after record insertion


    I use a grid with a RowEditor to read, update, create and destroy record.
    Records are correctly inserted, updated and read from/to the server and are correctly displayed in the grid (one can modify inserted records or delete them).

    However if a record is created and thereafter saved (calling store.save()) then if one selects it then such row can't be deselected any longer; so that record remains in a select state.

    For inserted record the id property is correctly set and phantom, dirty are set to false.

    The inserting row code is:

    Code:
                    var store = lgrid.getStore();
                    var rt = store.recordType;
                    var r = new rt(lgrid.newRecord);                        
                    lgrid.initialConfig.plugins[lgrid.rowEditorPluginIdx].stopEditing();
                    store.insert(0, r);
                    lgrid.getView().refresh();
                    lgrid.getSelectionModel().selectRow(0);
                    lgrid.initialConfig.plugins[lgrid.rowEditorPluginIdx].startEditing(0);
    when the user confirm changes (presses 'Update' button) it calls the function below:

    Code:
                    'afteredit': function(me, changes, record, rowIndex) {
                        me.grid.getStore().save();
                    }
    So, is there anything wrong with handling new records like above or is that a bug?

    regards

  2. #2
    Ext User
    Join Date
    Oct 2009
    Location
    Italy
    Posts
    16
    Vote Rating
    0
    callipigia is on a distinguished road

      0  

    Default


    I made some more checks and found out the problem is with the view: inserted record are correctly selected and deselected but the view doesn't update the selection state and keep showing inserted record as selected (gray) once it becomes selected for the very first time.

Similar Threads

  1. Grid: Selecting multiple rows using checkbox
    By amitava in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 28 Jun 2012, 11:47 PM
  2. Selecting rows in Grid
    By adetogni in forum Ext 3.x: Help & Discussion
    Replies: 17
    Last Post: 23 Dec 2010, 1:14 PM
  3. How to to iterate over rows in the grid without selecting them.
    By vinaykuma201 in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 6 Jul 2009, 1:01 AM
  4. Selecting grid rows after loading it dynamically
    By logicmedia in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 30 Mar 2009, 12:38 PM
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi