使用 dynatable table 的未定义单元格值
Undefined cell value with dynatable table
我正在尝试使用 dynatable 生成交互式 table。我按照文档说明进行操作,但我仍然在两列的所有值中得到 "undefined"。我认为 data-dynatable-ignore="true"
不起作用,我想知道正确的方法。
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: []
}
});
在浪费几个小时阅读动态文档后 documentation I noticed that it's not posible yet. So i moved on Datatables 我已经创建了我想要的东西。
希望 dynatable 能尽快提高您的开发可能性。
我正在尝试使用 dynatable 生成交互式 table。我按照文档说明进行操作,但我仍然在两列的所有值中得到 "undefined"。我认为 data-dynatable-ignore="true"
不起作用,我想知道正确的方法。
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: []
}
});
在浪费几个小时阅读动态文档后 documentation I noticed that it's not posible yet. So i moved on Datatables 我已经创建了我想要的东西。
希望 dynatable 能尽快提高您的开发可能性。