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.

3
  • Maybe this answer: stackoverflow.com/questions/7944325/… will help You. Commented Apr 4, 2012 at 7:43
  • 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 this Commented Apr 21, 2012 at 7:08
  • @priyankapatel i m facing the simlir problem as u mention in last comment......how u solved it?? Commented Jun 4, 2012 at 9:34

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.