4
我正在使用WebGrid帮助程序在我的MVC应用程序中对网格进行排序。如何在MVC3中将WebGrid添加列
@{
var grid = new WebGrid(Model, canSort:true);
@grid.GetHtml(columns:grid.Columns(
grid.Column("Username", "Full Name", canSort:true),
grid.Column("Profile","Profile", canSort:false)
));
}
排序的列将覆盖(显示链接)默认标题的风格我该怎么维护?
在最后一栏我有图像行动,这将使用JavaScript对话框
<img title="View Detail" style="cursor: pointer" onclick="openPopup('@item.EncryUserId')"
src="@Url.Content("~/Content/Images/view-fullscreen.png")" />
我如何可以添加使用的WebGrid这个附加列打开弹出?
谢谢。
感谢您的帮助,但是您错过了@text,它负责在(@)代码部分中包含html。 – 2012-02-18 12:27:32