jquery-datatables-checkboxes icon indicating copy to clipboard operation
jquery-datatables-checkboxes copied to clipboard

Limit the number of checkboxes that can be checked

Open Odepia opened this issue 6 years ago • 5 comments

Is there a way to limit the number of checkboxes that can be checked? Let's say that I want to limit the selection to 2 checkbox.

Thanks

Odepia avatar Apr 20 '18 18:04 Odepia

Is there a way to limit the number of checkboxes that can be checked? Let's say that I want to limit the selection to 2 checkbox.

Thanks

Hey, have you found a solution to this?

jude-lobo avatar Nov 29 '20 10:11 jude-lobo

Hey, have you found a solution to this?

No, I haven't! I had to go through another solution to do what I wanted. But, if you have a really one, let me know, I am still interesting about a solution, even after 2 years!

Odepia avatar Nov 29 '20 11:11 Odepia

There could be a couple ways of doing this, let me experiment with it and I can produce an example.

mpryvkin avatar Dec 01 '20 15:12 mpryvkin

This example is the closest I could come up with without modifying the Checkboxes plug-in. I had to disable "select all" control because it selects all checkboxes without limitation. I may need to think what kind of modifications are needed.

mpryvkin avatar Dec 15 '20 16:12 mpryvkin

Thank you very much for taking the time to answer me and produce a working example!, Michael! It's really appreciated!

Odepia avatar Dec 15 '20 16:12 Odepia