We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dropdown Template Checkbox with Multi column


          Here, i have to using Template in Dropdown.But, the problem is when i checked check box that get the All column text and showing on the text box .  But my recruitement is first colum text only showing on the  textbox. so, please help me..

thanks & regards


1 Reply

KV Karthikeyan Viswanathan Syncfusion Team April 8, 2017 01:31 PM UTC

Hi Tamil,     
Thanks for contacting Syncfusion support. 
You can cancel the selection using argument.cancel in Select event. And you can change the element value in change event without changing the model selection. You can use any one of the event to customize your requirement. Please refer to the below code snippet: 
    Html.EJ().DropDownList("DropDownList").Width("100%").Datasource((IEnumerable<Bikes>)ViewBag.datasource).MultiSelectMode(MultiSelectModeTypes.Delimiter).Width("200").Template("<span> ${text} </span>").WatermarkText("Select an item").ShowCheckbox(true).ClientSideEvents(obj => obj.Change("dropchange").Select("dropselect")).Render(); 
<script type="text/javascript"> 
    function dropselect(args) { 
// You can cancel the selection 
        if (args.value != "Apache RTR") 
            args.cancel = true; 
    function dropchange(args) { 
// You can select other items and replace the element value with first one. But model values are maintained with that selection. 
        if (args.selectedValue != "Apache RTR" || args.model.selectedIndices.indexOf(0) > -1) 
            this._visibleInput.val("Apache RTR"); 
        else this._visibleInput.val(""); 
Karthikeyan V. 

Live Chat Icon For mobile
Up arrow icon