when user clicks on the custom checkbox, the check symbol is not populating. Please guide me.
when user clicks on the custom checkbox, the check symbol is not populating. Please guide me.
Goutham.kn
Posts: 13Questions: 5Answers: 0
columns: [{
className: 'select_row',
//data: null,
defaultContent: "",
render: function ( data, type, row ) {
if ( type === 'display' ) {
return '<div class="custom-control custom-checkbox">' +
'<input type="checkbox" class="editor-active custom-control-input" id="'+row.DT_RowId+'"/>' +
'<label class="custom-control-label" htmlFor="'+row.DT_RowId+'"></label>' +'</div>';
}
return data;
}
},
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi @Goutham.kn ,
We're happy to take a look. As per the forum rules, if you could link to a running test case showing the issue we can offer some help. 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
https://datatables.net/extensions/select/examples/initialisation/checkbox
I have used the logic of the above example. Its working fine but i need to override the checkbox (check mark or symbol) to be a normal checkbox(check mark or symbol). please guide me
By "normal" do you mean a
<input type="checkbox">
element? If so, then that is not something that Select currently supports. It is something you could develop using a customer renderer to create the checkbox and then use the Select API to trigger the row selection based on the state of the checkbox.Allan
Thanks for providing the solution.
Thanks for providing the solution.