How can i get all the record selected with a checkbox in Ext.Datagrid

I have added a checkbox to my ext.grid using Ext.grid.CheckboxSelectionModel but i haven't be able to get all the record selected with the checkbox to update the record.

mferna22Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mferna22Connect With a Mentor Author Commented:
I found a soluition this is the code

 var modified =checkboxSel.getSelections();
                if(!Ext.isEmpty(modified)){
                    var recordsToSend = "";
                    inventarioGrid.el.mask('Saving', 'x-mask-loading'); //step 3
                    Ext.each(modified, function(record) { //step 2

                         recordsToSend = Ext.apply(record.data);
                         recordsToSend = Ext.encode(recordsToSend); //step 4
                        var jsonStr=JSON.parse(recordsToSend);
                     Ext.Ajax.request({      // step 5
                        url : 'editorgrid-ajax.php',
                      //  params :{records : recordsToSend},
                        params:{'idCaso' : jsonStr.IdCaso},
                       scope:this,
                        success : function(response) { //step 6
                            inventarioGrid.el.unmask();
                            inventarioGrid.getStore().commitChanges();
                        }});
                        });
                    inventarioGrid.stopEditing();
              }
0
 
Jini Jose.Net Team LeadCommented:
you have to loop through the grid records to get the selected records
0
 
mferna22Author Commented:
Ok, but how do i go through the grid records to get the selected ones
0
All Courses

From novice to tech pro — start learning today.