【发布时间】:2014-01-17 18:03:06
【问题描述】:
如何在MVC中为@Html.Grid添加Id字段,我的代码如下
@Html.Grid(Model).Columns(column =>
{
column.For(rph => rph.SpecificationAttributeOption).Named("").Attributes(style => "width:70%;");
}).Attributes(style => "width: 100%; border: 0px").RowStart((row) =>
{
if (row.IsAlternate) { return "<tr style=''>"; }
else { return "<tr>"; }
})
【问题讨论】:
-
@Html.Grid(Model).Columns(column=>{}).Attributes(id =>"id-of-your-choice")
标签: c# asp.net-mvc asp.net-mvc-4 razor nopcommerce