Solved

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

Posted on 2010-08-15
3
471 Views
Last Modified: 2012-05-10
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.

0
Comment
Question by:mferna22
  • 2
3 Comments
 
LVL 10

Expert Comment

by:Jini Jose
ID: 33441522
you have to loop through the grid records to get the selected records
0
 

Author Comment

by:mferna22
ID: 33442526
Ok, but how do i go through the grid records to get the selected ones
0
 

Accepted Solution

by:
mferna22 earned 0 total points
ID: 33442669
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now