1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    75
    Vote Rating
    1
    owenho is on a distinguished road

      0  

    Default get the id of selections line in grid ??

    get the id of selections line in grid ??


    Hi all,
    i have a question if possible,
    i add in my grid the option:
    Code:
    multiselect:true,
    when i select for exemple 2 or 3 lines,how can i get all her id.
    I tried that but it just gives me the id of a single line:
    Code:
    var selection = grid.getSelectionModel().getSelection()[0];
     	var ref_fonc_o=''+selection.get('id');
    help please,

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    In your code, you are asking for single selection.

    Try:

    Code:
    var users = [];
    for (var i = 0, rec; rec = selRows[i]; i++){
        users.push({ id: selRows[i].data.id_user });
    }
    // ajax call to delete all id instead of multiple calls to store.remove
    Ext.Ajax.request({
        params  : {
            ids: Ext.encode(users) // list of users
        },
    });
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    75
    Vote Rating
    1
    owenho is on a distinguished road

      0  

    Default


    Thanks Scottmartin,

    i used my code but in boucle like this :
    Code:
    var selection = grid.getSelectionModel().getSelection();			var ids='';
    		for(var i=0;i<selection.length;i++){
    			ids+=selection[i].get('id')+',';
    							}
    then i get my ids like this,
    Code:
    idselected1,idselected2,..
    Thanks for reply Scott

    Badr,

Thread Participants: 1

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