delete rows based on checkbox selection in slickgrid

Go To StackoverFlow.com

0

i am taking help of this example: http://mleibman.github.com/SlickGrid/examples/example-checkbox-row-select.html and add a checkbox column to my grid and assign unique_id value of my record to the id of checkbox column i am getting checked columns number using grid.getSelectedRows(); it gives me a index number of row. how can i get id of this selected rows in slickgrid? please help me if anyone have any idea.

2012-04-04 06:34
by priyanka patel
Maybe this answer: http://stackoverflow.com/questions/7944325/get-data-of-selected-rows-in-slickgrid/7944426#7944426 will help You - matma 2012-04-04 07:43
ya it is working. thank yo - priyanka patel 2012-04-06 07:53
I have one problem when i am selecting row first time & then use grid.getSelectedRows(); it will give me correct answer but after deselecting previous one and selecting new row it will give me previous data + new data how can i solve thi - priyanka patel 2012-04-21 07:08
@priyankapatel i m facing the simlir problem as u mention in last comment......how u solved it? - Priyank Patel 2012-06-04 09:34


1

var selectedrows = grid.getSelectedRows();            
for(i=0;i<len;i++){                        
var d = grid.getData().getItem(selectedrows[i]);                         
                        if(d != null && d != 'undefined'){
                              dataView.deleteItem(d.id);
                               grid.invalidate();                                   
                               grid.updateRowCount();
                               grid.render();
                        }
                    }                    

It removes rows from grid. not from server side.

2013-02-18 12:10
by priyanka patel
Ads