Yahoo YUI DataTable.DataSource,无论如何要简单更新?
是否有一种简单的方法可以通过请求更新 DataTable,而不必再次请求整个结果集?
目前我正在这样做:
// register add modules event
Y.one('#add_modules').on('click', function(e) {
e.preventDefault();
table.datasource.load({
request: 'module_id=' + Y.one('#model').get('value') + '&module_count=' + Y.one('#module_count').get('value') + '&array_id=' + <?php echo $pv_array->id; ?>
});
});
尽管这会删除任何现有数据并使用请求结果填充表,因为我想简单地“更新”表而不是再次请求整个结果集。
Is there a simple way to update a DataTable through a request rather then having to request the entire result set again?
currently im doing this:
// register add modules event
Y.one('#add_modules').on('click', function(e) {
e.preventDefault();
table.datasource.load({
request: 'module_id=' + Y.one('#model').get('value') + '&module_count=' + Y.one('#module_count').get('value') + '&array_id=' + <?php echo $pv_array->id; ?>
});
});
Although this removes any existing data and populates the table with the request result where as i want to simply "update" the table rather then having to request the whole result set again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 将新记录添加到 RecordSet(recordSet 是 DataTable 数据的存储库) recordSet.add方法
add a new Record to the RecordSet (recordSet is the repository for DataTable data) using recordSet.add method