c# - How pass list<object> into webgrid -
i'm trying put webgrid collection
public class myclass() { list<row> rows {get; set;} } public class row() { public string code {get; set;} } grid.column("amount", format: @<text> @html.textboxfor(model => model.rows.firstordefault().code, new { @class = "edit-mode", size = 5 }) </text>),
using model.rows.firstordefault().code
works returns first element of collection in each row.
model.rows.getenumerator().current.code
returns nothing
how right desision each element of collection in own row
used format: inputextensions.textbox(html, "last name", item.lastname) // static call
Comments
Post a Comment