Solved

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

Posted on 2010-08-15
3
476 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with this homework problem. 5 59
dynamic created check uncheck boxes 6 42
JS library vs Js framework 11 23
modify change color of text 9 37
Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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.

733 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