Select multiple check boxes
Select multiple check boxes
kenrights
Posts: 36Questions: 10Answers: 0
Hi Guys,
I'm looking to implement multiple check boxes and then edit. It seems to get gummed up on this code which is currently commented out in my live.datatables.net:
{
data: "active",
render: function ( data, type, row ) {
if ( type === 'display' ) {
return '<input type="checkbox" class="editor-active">';
}
return data;
},
className: "dt-body-center"
},
I'm thinking the issue is around class="editor-active"
or className: "dt-body-center"
but, I'm having trouble finding documentation that I can comprehend on what these properties do. My console:
Any suggestions on how I can get those check boxes to show up?
Thank you,
This discussion has been closed.
Answers
Are you trying to use the always shown example? The
editor-active
class is just used to allow easy targeting of event handlers to handle thechange
event.That stuff isn't needed to use checkboxes in Editor's main form. That's just for the always shown example.
Allan
Yes, I'm trying to use the always shown example. Sorry I messed up on the link when I started this thread. I liked this example because I'm designing for mobile and I noticed that I can check off multiple rows with my finger before submitting (submit to be built).
When you wrote above that the
editor-active
class 'stuff' isn't needed to use checkboxes in Editor's main form, I'm not clear on that. In pouring over the Always Shown example, I came to think that I had to add these FIVE SECTIONS to my js:ONE: //part of fields property and needed to insert the check box column
TWO (the section that appears to be causing the break):
THREE:
FOUR:
FIVE: I wasn't clear on what this did.
The
editor-active
syntax is located in sections TWO, FOUR and FIVE above.BTW: The "Always Shown Checkbox" page says at the bottom that I must load these modules:
I tried loading the above and it didn't help so I removed them as they might be already included in the 16 js files that are already being loaded.
Finally, I scrapped the above and tried to go with a simpler example just to see if I could get the check boxes to appear on each row. This also was a failure. The console might be of help but, not to me.
going in a different direction. this can be closed.