我正在尝试向数据网格添加删除按钮(使用backgrid.js http://backgridjs.com/)
我有一个选择行
var grid = new Backgrid.Grid({
columns: [{
// name is a required parameter, but you don't really want one on a select all column
name: "id",
// Backgrid.Extension.SelectRowCell lets you select individual rows
cell: "select-row",
}].concat(columns),
collection: contacts
});
按钮:
<button id= "button" type="button">Delete</button>
和
$('#button').click(function () {
});
但我如何获得所选的行ID?并将其发送到服务器,从DB中删除数据?