2 columns of checkboxes, and when one is checked, the other is automatically checked

2 columns of checkboxes, and when one is checked, the other is automatically checked

miyatakamiyataka Posts: 10Questions: 3Answers: 0

I have 2 columns of checkboxes. (CHECK1 columns and CHECK2 colmuns)
If the checkbox in the check1 column is pressed, I want to automatically check the checkbox in the check2 column as well.
But I don't want check1 to be checked when check2 is pressed.
is it possible?
Maybe This is probably my last question.

let columns = [
  { data: 'CHECK1', checkboxes: { selectRow: true } },
  { data: 'CHECK2', checkboxes: { selectRow: true } },
  { data: 'GROUP_NAME'},
  { data: 'NAME'},
]
 let option = {
    columns: columns,         
    data: data,
  ],
}
let table = $('#table').DataTable(option);

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Is this using Editor? Or are you editing the table some other way?

    Colin

  • miyatakamiyataka Posts: 10Questions: 3Answers: 0

    Thank you for reply Colin-san.
    I'm using checkboxes.

  • miyatakamiyataka Posts: 10Questions: 3Answers: 0

    Ah sorry I didnt use Editor

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    Are you saying you are using the Gyrocode checkboxes plugin? If so you will need to ask the developer of the plugin.

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    If you're not, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • miyatakamiyataka Posts: 10Questions: 3Answers: 0

    Oh, I'm sorry.
    I was too flustered and didn't read the forum rules properly.
    Thanks for your kind reply.

Sign In or Register to comment.