1
如何在MVC添加ID字段的@ Html.Grid,我的代碼如下如何爲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」) – Sai