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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dropdown Template Checkbox with Multi column

Thread ID:





129860 Apr 6,2017 10:18 AM UTC Apr 8,2017 01:31 PM UTC ASP.NET Core 1
Tags: DropDownList
Asked On April 6, 2017 10:18 AM UTC


          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


Karthikeyan Viswanathan [Syncfusion]
Replied On 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. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon