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',以反映大小?