4
@grid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
rowStyle: "row",
selectedRowStyle: "selected-row",
columns: grid.Columns(
grid.Column("StartDate", "Start Date", style: "column"),
grid.Column("EndDate", "Endt Date", style: "column"),
grid.Column("Title", "Title", style: "column"),
grid.Column(format: (item) => Html.ActionLink("Edit", "Edit", new { id = item.ID }), style: "column-action"),
grid.Column(format: (item) => Html.ActionLink("Delete", "Delete", new { id = item.ID }), style: "column-action"))
我想要做的就是更換grid.Column(format: (item) => Html.ActionLink("Delete", "Delete", new { id = item.ID }), style: "column-action")
與
<button onclick="$.prompt('Delete',{ buttons: { Ok: true, Cancel: false } })" title="Delete">Delete</button>
我該怎麼辦呢?
P.S.最後的目標是當我們點擊DELETE按鈕時顯示彈出窗口YES/NO。
您的a pproach看起來不錯...但我得到了以下的東西:Delete你能說一下關於@class嗎? – Terminador 2012-02-04 14:34:42
對不起,我的錯誤,我把風格屬性放在路線值params。我編輯了答案。 – 2012-02-04 14:36:54
嗯,你知道事件$(「。delete-button」)。不開火...你知道我必須執行它嗎? – Terminador 2012-02-04 14:56:31