Closed quiidado closed 5 years ago
I had a look and as far as I can tell the checkbox column is added in js. So no need to mess with the ColumnDT. You should just add the relevant js code to the template you use to generate the html.
Ok - thank you for the look. I will keep digging to see if I can figure it out. When I add in the js code from that jsfiddle example it appears that my table is misaligned and column 0 gets stuffed with data instead of becoming a checkbox column. Is there something I need to define in my columns lists to let sqlalchemy-datatables know that column 0 is statically defined? This is what my columns variable is defined as:
columns = [
ColumnDT(userDB.item),
ColumnDT(userDB.item1),
ColumnDT(userDB.item2),
ColumnDT(userDB.item3),
ColumnDT(userDB.item4),
ColumnDT(userDB.item5),
]
Closed old issue
Unsure if this is user error or a potential issue with the code. I would like to utilize sqlalchemy-datatables to supply information to a datatable where column 0 is a multiselect checkbox. Similar to this functionality: https://jsfiddle.net/gyrocode/snqw56dw/
I am unsure what I would need to supply to the definition of "columns" in my python code. Is there something special I would need to define for ColumnDT that allows me to make the first column a checkbox?
Is this possible with this library? Would someone mind pointing me int he right direction?