Skip to content

Instantly share code, notes, and snippets.

@Rookian
Created January 15, 2013 21:00
Show Gist options
  • Save Rookian/4542003 to your computer and use it in GitHub Desktop.
Save Rookian/4542003 to your computer and use it in GitHub Desktop.
@using (Html.BeginForm("PostData", "Home", FormMethod.Post, new { id = "simpleForm" }))
{
@(Html.Grid(Model.Items)
.RenderUsing(new PostAsListRenderer<ItemModel>("list"))
.Columns(c =>
{
c.For(x => Html.Partial("Grid/Id", x)).Named("Id");
c.For(x => Html.Partial("Grid/Name", x)).Named("Name");
c.For(x => Html.Partial("Grid/Description", x)).Named("Description");
c.For(x => Html.Partial("Grid/SelectedItem", new ListModel { SelectedItem = x.SelectedItem, SelectListItems = Model.SelectListItems })).Named("DropDown");
}))
<input type="submit" value="submit" id="btnSubmit" />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment