Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Asp.Net MVC Combox with Multiselection with checkboxes
posted

I am not able to figure out the syntax for @Html.Infragistics().ComboFor when multiselection with checkboxes is required. I am using the latest version 2015.1.

Thanks for your help.

Mir

Parents
  • 20255
    Verified Answer
    Offline posted

    Hello Mir Majeed,

    Thank you for contacting us.

    Below you will find code snippet that is showing simple implementation of the scenario that you've mentioned.

    View:

    @(Html.Infragistics().ComboFor(item => item.LocationID)

      .Width("200px")

      .DataSourceUrl(Url.Action("ComboDataLocation"))

         .MultiSelectionSettings(ms => {

         ms.Enabled(true);

         ms.ShowCheckBoxes(true);

          })

      .ValueKey("LocationID")

      .TextKey("Country")

         .DataBind()

         .Render()

    )

    Controller:

    [ActionName("index")]

    public ActionResult Index()

    {

      Factory factory = new Factory();

      List<ComboExample.Models.Location> locations = factory.GetLocation();

      return View("MultiSelection", locations.First<ComboExample.Models.Location>());

    }

Reply Children