How to add a checkbox to the table header
How to add a checkbox to the table header
Hi,
I am trying to add a checkbox to the table header. I've searched the forum didn't quite find an answer. I am not using a fixed width header.
Here's the code sample:
Javascript:
oTable[uniqSubProdID] = $("#documentTable").dataTable(datatableConfig);
var datatableConfig = {
"aaData": aDataSet,
"aoColumns": [{
"sTitle": "Type",
"sClass": "left",
"sWidth": "20%"
},
{
"sTitle": "Sub Type",
"sClass": "center",
"sWidth": "10%",
"bSortable": false
},
{
"sTitle": "Name",
"sClass": "left",
"sWidth": "20%"
},
{
"sTitle": "Access",
"sClass": "right",
"bSortable": false,
"sWidth": "10%"
}
],
"bPaginate": false,
"bFilter": false,
"bSort": false,
"bAutoWidth": false,
"bLengthChange": true,
"bStateSave": false,
"bProcessing": true,
"fnDrawCallback": tableDrawn
};
If I want to add a checkbox next to the column header Access, how should I go about that?
Thanks!
I am trying to add a checkbox to the table header. I've searched the forum didn't quite find an answer. I am not using a fixed width header.
Here's the code sample:
Javascript:
oTable[uniqSubProdID] = $("#documentTable").dataTable(datatableConfig);
var datatableConfig = {
"aaData": aDataSet,
"aoColumns": [{
"sTitle": "Type",
"sClass": "left",
"sWidth": "20%"
},
{
"sTitle": "Sub Type",
"sClass": "center",
"sWidth": "10%",
"bSortable": false
},
{
"sTitle": "Name",
"sClass": "left",
"sWidth": "20%"
},
{
"sTitle": "Access",
"sClass": "right",
"bSortable": false,
"sWidth": "10%"
}
],
"bPaginate": false,
"bFilter": false,
"bSort": false,
"bAutoWidth": false,
"bLengthChange": true,
"bStateSave": false,
"bProcessing": true,
"fnDrawCallback": tableDrawn
};
If I want to add a checkbox next to the column header Access, how should I go about that?
Thanks!
This discussion has been closed.
Replies
I've done the following and it worked.
[code]
{
"sTitle": "Access ",
"sClass": "center",
"sWidth": "10%",
"bSortable": false
}
[/code]
Thanks again!