0
我想对数据动态更新dataTable的行计数
检索更新我的DataTable的row_count
我创建一个空的DataTable,并使其myDiv
:
var dataTable = new Y.DataTable({
columns: columns,
footerView: Y.FooterView,
footerConfig: {
fixed: true,
heading: {
colspan: 3,
content: "Number Records : {row_count} "
}
}
}).render("#myDiv");
上的一个按钮的点击,dataTable会被IO请求填充。
var node = Y.one('#searchButton');
node.on(
'click',
function() {
dataSource = new Y.DataSource.IO({source:'mySource'});
...
//code to set data in dataTable
...
size = dataTable.data.size(); //retrieves the number of records, but row_count in the footer of course remains '0'
我怎么能动态地更新footerView 内容的 'ROW_COUNT',以反映大小?