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

source:

used format: inputextensions.textbox(html, "last name", item.lastname) // static call


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -