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
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>());
}
Thanks Zdravko.