@grid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
columns: grid.Columns(
grid.Column(format: @<a href="~/EditMovie?id=@item.ID">Edit</a>),
grid.Column("Title"),
grid.Column("Genre"),
grid.Column("Year")
)
)
可以对grid.Column设置Format
grid.Column(format: @<ahref="~/EditMovie?id=@item.ID">Edit</a>),
注意:@item.ID
format的用法:
format:@str str里有带@号的变量
grid.Column(format:@<a href="~/EditMovie?id=@item.ID)">Edit</a>)