MvcExtraControls.ListEditor 1.0.3

Helpfull extensions to System.Web.Mvc.HtmlHelper.
Method ListEditorFor creates an editor to add, remove and change elements in a list on the view model.

Install-Package MvcExtraControls.ListEditor -Version 1.0.3
dotnet add package MvcExtraControls.ListEditor --version 1.0.3
<PackageReference Include="MvcExtraControls.ListEditor" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MvcExtraControls.ListEditor --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MvcExtraControls.ListEditor, 1.0.3"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Extension-method ListEditorFor creates an editor to add, remove and change elements in a list on the view model with full binding.

GitHub


Example usage

Model:
    [Bind(Include = "StringList")]
    public class ViewModel
    {
        public List<string> StringList { get; set; }
    }
View:
@using MvcExtraControls.Library;
<html>
  <head>
    <script src="/Scripts/ListEditor.js"></script>
    <link href="~/Content/ListEditor.css" rel="stylesheet" />
  </head>
  <body>
    @Html.ListEditorFor(m => m.StringList)
  </body>
</html>
Controller:
public ActionResult Index()
{
  var model = new ViewModel()
  {
    StringList = new List<string> { "One", "Two", "Three" }
  };

  return View(model);
}
Result:

Result

Extension-method ListEditorFor creates an editor to add, remove and change elements in a list on the view model with full binding.

GitHub


Example usage

Model:
    [Bind(Include = "StringList")]
    public class ViewModel
    {
        public List<string> StringList { get; set; }
    }
View:
@using MvcExtraControls.Library;
<html>
  <head>
    <script src="/Scripts/ListEditor.js"></script>
    <link href="~/Content/ListEditor.css" rel="stylesheet" />
  </head>
  <body>
    @Html.ListEditorFor(m => m.StringList)
  </body>
</html>
Controller:
public ActionResult Index()
{
  var model = new ViewModel()
  {
    StringList = new List<string> { "One", "Two", "Three" }
  };

  return View(model);
}
Result:

Result

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.3 754 1/6/2018
1.0.2 477 12/30/2017
1.0.1 577 12/30/2017
1.0.0 563 12/29/2017