我的网格看起来像这样 -
@{
var grid = new WebGrid(source: Model.products,
rowsPerPage: 40);
}
@grid.GetHtml(
tableStyle: "gridtable",
alternatingRowStyle: "even",
columns: grid.Columns(
grid.Column("ProductName", "Product"),
grid.Column("Price", "Price"),
grid.Column("Quantity", "Left:"),
grid.Column("Image", header: "Image", format: @<text><img src="@item.Image" width="250px" height="200px"></img></text>)
)
)
我想添加一个列,显示每行的按钮,按下后,将当前项的属性减少1,然后弹出一条消息。 我该怎么办?