1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    64
    Answers
    2
    Vote Rating
    0
    punith.mailme is on a distinguished road

      0  

    Exclamation Unanswered: Ext.each() to retrive the selected values from the grid

    Unanswered: Ext.each() to retrive the selected values from the grid


    Hi All,

    I have a grid and i want to get the selected values to be retrived. I am doing it as below but getting a errorExt.each(Ext.getCmp('availableBodyTrimPanel').getSelectionModel().getSelection(), function(record, index, allRecords) {
    me.getSelectedTrimsStore().add(record);
    });



    kindly help pls............

    thanks
    Punith

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    What kind of store and model has availableBodyTrimPanel? Is it different from me.getSelectedTrimsStore()?

    In that case maybe the two different stores have different ids and is it searching for a key property that doesn't exist when you add that record.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    64
    Answers
    2
    Vote Rating
    0
    punith.mailme is on a distinguished road

      0  

    Default


    yep u guessed it right

    i have a same model for both of the stores.

    Ext.define('com.gm.vl.model.YMMModel', {
    extend: 'Ext.data.Model',
    fields: ['label','value']
    });

    and availableBodyTrimPanel is of type selType: 'checkboxmodel', and Ext.data.Store

    and SelectedTrimsStore is of simple store and xtype : grid (Not checkboxmodel)
    extend: 'Ext.data.Store',
    model: 'com.gm.vl.model.YMMModel',


    is there any mistake as i am moving from checkbox model to simple grid ??


    Thanks
    Punith

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    64
    Answers
    2
    Vote Rating
    0
    punith.mailme is on a distinguished road

      0  

    Default


    and here is the recent change i did in past 10min. of overcoming using the ext.each() as i will not be doing a multiple select and handle based on each checkbox click event.

    ,'searchPanel grid[action=addtrimsSelect]': {
    select: function(model, record, index) {
    alert("select");
    alert(record);
    this.getSelectedTrimsStore().add(record);
    this.getSelectedTrimsStore().getView().refresh();
    },
    //deselect: this.removeTrims
    deselect: function(model, record, index) {
    alert("deselect");
    alert(record);
    this.getSelectedTrimsStore().remove(record);

    }
    }



    Now i have no error as above but the data is not moved(added) to other store (saw in the dev tools of chrome) and the store not refreshed :O

    Please help

Thread Participants: 1

Tags for this Thread

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