2013-07-02 20 views

回答

2

您需要從集合中刪除模型對象,然後該集合將觸發適當的事件來更新表格。

因此,在您長按事件

$.tableview.deleteRow(e.index); 
collection.models[e.index].destroy() // should delete model, use index to get model 
            // from the collection 

collection.fetch();     // should force table to update 
+0

您好,感謝這個答案,但我不知道爲什麼即時通訊在這條線得到一個錯誤:collection.models [e.index] .destroy(),一消息顯示「Uncaught TypeError:無法讀取未定義的屬性」。 –

+0

需要提供一些代碼... –

相關問題