0
我試圖將隱藏值添加到我的WebGrid中,所以甚至沒有顯示列。雖然Html.Hidden
的部分工作得很好,但列仍在顯示。有什麼建議麼?WebGrid中的隱藏列(ASP.Net)
我WebGrid
WebGrid grid1 = new WebGrid(Model.StamfordRel, canPage: false, fieldNamePrefix: "g1", pageFieldName: "p1");
@grid1.GetHtml(
headerStyle: "wg_header",
columns: new[] {
grid1.Column("logNo",
header: null,
format: (item) => Html.Hidden("logNo", (object)item.logNo),
style: "width"),
grid1.Column("instanceNo",
header: null,
format: (item) => Html.Hidden("instanceNo", (object)item.instanceNo),
style: "width_logNo"),
})