dataTables don't work with 2 and 3 complex headers
by Serg Krasov
HTML
<script src="//cdn.datatables.net/1.10.6/js/jquery.dataTables.js"></script>
<table id='data_panel' class='tftable'>
<thead>
<tr><th rowspan="3" colspan="1"> </th><th rowspan="3" colspan="1">Крупный Бизнес</th><th rowspan="1" colspan="4">Средний Бизнес</th><th rowspan="3" colspan="1">Малый Бизнес</th><th rowspan="1" colspan="2">Физические Лица</th></tr><tr><th rowspan="2" colspan="1">На специальные нужды</th><th rowspan="1" colspan="2">На финансирование активов2</th><th rowspan="2" colspan="1">На финансирование активов</th><th rowspan="2" colspan="1">На потребит. нужды</th><th rowspan="1" colspan="1">На финансирование недвижимости</th></tr><tr><th rowspan="1" colspan="1">На специальные нужды3</th><th rowspan="1" colspan="1">На финансирование активов3</th><th rowspan="1" colspan="1">Бизнес</th></tr>
</thead>
<tbody></tbody>
</table>
CSS
/*******************************************************************************
* Tree container
*/
ul.dynatree-container
{
font-family: tahoma, arial, helvetica;
font-size: 10pt; /* font size should not be too big */
white-space: nowrap;
padding: 3px;
margin: 0; /* issue 201 */
background-color: white;
border: 1px dotted gray;
overflow: auto;
height: 100%; /* issue 263 */
}
ul.dynatree-container ul
{
padding: 0 0 0 16px;
margin: 0;
}
ul.dynatree-container li
{
list-style-image: none;
list-style-position: outside;
list-style-type: none;
-moz-background-clip:border;
-moz-background-inline-policy: continuous;
-moz-background-origin: padding;
background-attachment: scroll;
background-color: transparent;
background-repeat: repeat-y;
background-image: url("vline.gif");
background-position: 0 0;
/*
background-image: url("icons_96x256.gif");
background-position: -80px -64px;
*/
margin: 0;
padding: 1px 0 0 0;
}
/* Suppress lines for last child node */
ul.dynatree-container li.dynatree-lastsib
{
background-image: none;
}
/* Suppress lines if level is fixed expanded (option minExpandLevel) */
ul.dynatree-no-connector > li
{
background-image: none;
}
/* Style, when control is disabled */
.ui-dynatree-disabled ul.dynatree-container
{
opacity: 0.5;
/* filter: alpha(opacity=50); /* Yields a css warning */
background-color: silver;
}
/*******************************************************************************
* Common icon definitions
*/
span.dynatree-empty,
span.dynatree-vline,
span.dynatree-connector,
span.dynatree-expander,
span.dynatree-icon,
span.dynatree-checkbox,
span.dynatree-radio,
span.dynatree-drag-helper-img,
#dynatree-drop-marker
{
width: 16px;
height: 16px;
/* display: -moz-inline-box; /* @ FF 1+2 removed for issue 221 */
/* -moz-box-align: start; /* issue 221 */
display: inline-block; /* Required to make a span sizeable */
vertical-align: top;
background-repeat: no-repeat;
background-position:...
JavaScript
var myDataTable = $('#data_panel').dataTable({
data:[{"check0":{"id":"511","title":"белорусские рубли","html":"<input type=\"checkbox\" value=\"511\" checked>белорусские рубли</input>"},"check1":{"id":"311","title":"Крупный Бизнес","html":"<input type=\"checkbox\" value=\"311\" checked>311</input>"},"check2":{"id":"91","title":"На специальные нужды","html":"<input type=\"checkbox\" value=\"91\" checked>91</input>"},"check3":{"id":"111","title":"На специальные нужды3","html":"<input type=\"checkbox\" value=\"111\" checked>111</input>"},"check4":{"id":"112","title":"На финансирование активов3","html":"<input type=\"checkbox\" value=\"112\" checked>112</input>"},"check5":{"id":"93","title":"На финансирование активов","html":"<input type=\"checkbox\" value=\"93\" checked>93</input>"},"check6":{"id":"313","title":"Малый Бизнес","html":"<input type=\"checkbox\" value=\"313\" checked>313</input>"},"check7":{"id":"81","title":"На потребит. нужды","html":"<input type=\"checkbox\" value=\"81\" checked>81</input>"},"check8":{"id":"813","title":"Бизнес","html":"<input type=\"checkbox\" value=\"813\" checked>813</input>"}}],
columns: [{"data":"check0"},{"data":"check1"},{"data":"check2"},{"data":"check3"},{"data":"check4"},{"data":"check5"},{"data":"check6"},{"data":"check7"},{"data":"check8"}],
aoColumnDefs: [{"targets":0,"sClass":"grayColumn","render":{"_":"html","filter":"id","display":"html"},"bSortable ":false},{"targets":1,"data":"check1","render":{"_":"html","filter":"id","display":"html"},"bSortable ":false},{"targets":2,"data":"check2","render":{"_":"html","filter":"id","display":"html"},"bSortable ":false},{"targets":3,"data":"check3","render":{"_":"html","filter":"id","display":"html"},"bSortable ":false},{"targets":4,"data":"check4","render":{"_":"html","filter":"id","display":"html"},"bSortable ":false},{"targets":5,"data":"check5","render":{"_":"html","filter":"id","display":"html"},"bSortable...