Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
Row Selectors with Checkboxes
posted

Hi there,

I'm using latest release 12.2.20122.2176 and doing multiple row selection with check boxes, it's working fine.

I've a requirement to update another row and also select it. Problem is that when I try to click any cell of unselected row, it uncheck the check boxes of all selected rows.

And I also found that same thing on your example on below link:

http://es.infragistics.com/products/jquery/sample/grid/row-selectors-with-checkboxes

Please advise any help, its very urgent for us.

Regards,

Jasdeep

Parents
  • 49378
    Verified Answer
    posted

    Hello Jasdeep,

    Thank you for posting in the community.

    What you are describing seems to be the default behavior of igGrid as clicking on an unselected row's cells would unselect the selected rows and also automatically uncheck their checkboxes. If you are using row selection and wish to ensure that rows would not be unselected when clicking on unselected row's cells (or that when clicking on an already selected row the other currently selected rows won't be unselected) you may use something similar to:

                        features: [
                        {
                            name: "RowSelectors",
                            enableCheckBoxes: true
                        },
                        {
                            name: "Selection",
                            mode: "row",
                            multipleSelection: true,
                            rowSelectionChanging: function(evt, ui) {
                                var rowIndex = ui.row.index;
                                var selectedRows = ui.selectedRows;
     
                                for(i=0; i <selectedRows.lengthi++) {
                                    if(selectedRows[i].index === rowIndex) {
                                        evt.preventDefault();
                                        return;
                                    }
                                }
     
                                evt.preventDefault();
                                $("#rowSelectorsGrid").igGridSelection("selectRow"rowIndex);
     
                                debugger;
                            }
                        }
                    ]
     
    Please let me know if this helps.

     

Reply Children
No Data