我正在使用jTable插件版本 2.3.0 对动态表进行 CRUD 操作。在此,当我添加一个新行时,它会存储在数据库中。但是创建弹出窗口没有关闭,表格也没有刷新。
但是当我编辑任何行时,编辑弹出窗口会关闭,表格也会关闭。创建仅导致问题的行。
我在 js 中添加了两个事件。
//Register to selectionChanged event to hanlde events
recordAdded: function(event, data){
//after record insertion, reload the records
$('#PriorIncidentTable').jtable('load');
},
recordUpdated: function(event, data){
//after record updation, reload the records
$('#PriorIncidentTable').jtable('load');
}
在这两个事件中,每当我编辑任何行时都会调用 recordUpdated 事件。所以桌子也正在刷新。但是 recordAdded 事件根本没有被调用。我不知道缺少什么。任何建议都非常感谢。谢谢。