0
我想打电话给引导的一个模式,我有在控制器中的部分观点,我使用jQuery的Ajax和Bootgrid的JavaScript的呼叫行动bootgrid
enter code here var grid = $("#grid").bootgrid(
{
ajax: true,
url: "/Currency/listCurrencyJson",
formatters: {
"commands": function(column, row)
{
return "<button type=\"button\" class=\"btn btn-default btn-lg delete\" data-row-id=\"" + row.id + "\"><span class=\"glyphicon glyphicon-star\" aria-hidden=\"true\"></span> Star</button>" +
"<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.id + "\"><span class=\"fa fa-pencil\"></span></button> " +
"<button type=\"button\" class=\"btn btn-xs btn-default command-delete\" data-row-id=\"" + row.id + "\"><span class=\"fa fa-trash-o\"></span></button>";
}
}
}).on("loaded.rs.jquery.bootgrid", function()
{
/* Executes after data is loaded and rendered */
grid.find(".command-edit").on("click", function (e) {
alert("You pressed edit on row: " + $(this).data("row-id"));
}).end().find(".delete").on("click", function deleteCurrency(id)
{
$.ajax(
{
url: '/Currency/createCurrency',
type: "POST",
data: { "row-id": "row-id" },
success: function()
{
//alert("Done");
}
});
});
});
我如何能在按钮的部分提出@ ajax.ActionLink() – pabloso18 2015-02-05 19:22:31