Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-08-15
3
Medium Priority
?
481 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses

926 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