I'm trying gerenate a interactive table with dynatable. I followed the documentation instructions but i'm still getting "undefined" in all values of two columns. I believe that data-dynatable-ignore="true"
is not working and I want to know the right way to do it.
HTML:
<table id="example" cellspacing="0" width="100%" class="dynatable table table-condensed table-hover table-striped table-bordered">
<thead>
<tr>
<th rowspan="2" data-dynatable-column="Unidade">Unidade</th>
<th rowspan="2" data-dynatable-column="Meta">Meta</th>
<th colspan="2" data-dynatable-ignore="true">Inclusão</th>
<th colspan="2" data-dynatable-ignore="true">Confirmação</th>
</tr>
<tr>
<th data-dynatable-column="ValorI">Valor</th>
<th data-dynatable-column="%I">%</th>
<th data-dynatable-column="ValorC">Valor</th>
<th data-dynatable-column="%C">%</th>
</tr>
</thead>
</table>
JS:
$('#example').dynatable({
features: {
paginate: false,
sort: true,
pushState: false,
search: false,
recordCount: false,
perPageSelect: false
},
dataset: {
ajax: true,
ajaxUrl: 'https://api.myjson.com/bins/n4ecd',
ajaxOnLoad: true,
records: []
}
});
JSFIDDLE: https://jsfiddle.net/pvviana/fw69uLus/
After waste a couple hours reading the dynatable documentation documentation I noticed that it's not posible yet. So i moved on Datatables and i already created what i wanted.
I hope dynatable would improve your development possibilities soon.