Search results

Custom Value in ASP.NET MVC MultiSelect control

The MultiSelect allows user to add a new non-present option to the control value when allowCustomValue is enabled. while selecting the new custom value customValueSelection event will be triggered.

The following sample demonstrates configuration of custom value support with the MultiSelect control.

<div id='local-data'>
    <div class='control-wrapper'>
        @Html.EJS().MultiSelect("default").Placeholder("Select games").AllowCustomValue(true).DataSource((IEnumerable<object>) Syncfusion.EJ2.DropDowns.MultiSelectFieldSettings { Text = "Game", Value = "Id" }).Render()
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WebApplication1.Models;

namespace WebApplication1.Controllers
    public class MultiSelectController : Controller
        public ActionResult customvalue()
   = new GameList().GameLists();
            return View();