Converting hardcoded Html checkboxes using Gyro
Converting hardcoded Html checkboxes using Gyro
Sageis1
Posts: 53Questions: 9Answers: 0
Hello, I would like someone to show me how to use the Gyro plugin to convert the hard coded values in HTML.
The Idea is to not override the current styling of each checkbox, and to add the select All Checkbox.
Here is the test case : http://live.datatables.net/weluyanu/42/edit
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The Gyrocode checkboxes plugin will add its own attributes to the cell which it sounds like you don't want to happen, So you won't be able to use it.
EDIT: Updated the example.
Use a change event for the checkbox and use
row().select()
orrow().deselect()
as appropriate. See this example:http://live.datatables.net/lulaluye/1/edit
Kevin
Thanks @kthorngren , is there a way to add a select all check boxes without changing the Hard coded HTML style or values.
Just add the checkbox to the header then create an event handler for that checkbox and use
rows().select()
to select all rows orrows().deselect()
.Kevin
@kthorngren, I think i found a way around the harcoded values, okay give the test case ( http://live.datatables.net/sejexuge/588/edit ) how do i only select the checkboxes, not the rows, or add the "Checked" property to all the inputs when clicked.
See this Stack Overflow thread for ways to use jQuery to check and uncheck checkboxes.
Kevin