var grid = new WebGrid(Model, rowsPerPage: 10, canPage: true);
@grid.GetHtml(
columns: new[]
{
grid.Column("CompanyName",
style: "col1",
format:@Html.TextBoxFor(modelItem => modelItem.CompanyName,new{@class="edit-mode"})
)
})
在格式上它的显示是这样的
cannot convert from html string to function <dynamic object>
我也试过
format: item => Html.TextBox(
(string)item.CompanyName
)
如何在 webgrid 中格式化 html 助手?