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
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

Is it possible to warn the user, when the disable items in the DropDownList are selected

Platform: jQuery |
Control: ejDropDownList


We can able to show the “warning” message, when the disabled items in the DropDownList is hovered. This can be achieved by adding the additional span tag to the “li” elements of the DropDownList in the client side event called “create”.


  1. Render the DropDownList as follows




<div class="control">

    <div class="ctrllabel">Select your skill</div>

    <input type="text" id="skillsets" />

    <button id="btn">Disable</button>



<script type="text/javascript">

    var target;

    $(function () {

        var skillset = [

            { skill: "ASP.NET" }, { skill: "ActionScript" }, { skill: "Basic" },

            { skill: "C++" }, { skill: "C#" }, { skill: "dBase" }, { skill: "Delphi" },

            { skill: "ESPOL" }, { skill: "F#" }, { skill: "FoxPro" }, { skill: "Java" },

            { skill: "J#" }, { skill: "Lisp" }, { skill: "Logo" }, { skill: "PHP" }



            dataSource: skillset,

            fields: { text: "skill" },

            showCheckbox: true,

            enableFilterSearch: true,

            create : "myFunc"



            showRoundedCorner: true,

            size: "mini",

        click : "onClick"


        target = $('#skillsets').data("ejDropDownList");




DropDownList with disabled

  1. Upon clicking to the Disable button, certain element in the DropDownList will be disabled.



function onClick(args){




DropDownList with filter


  1. In the “create” event of DropDownList, we have appended the span element to the all items (li element) in the DropDownList.



function myFunc(args){

        this._getLi().append($("<span class='e-msg e-icon'> </span>"));



  1. When hover to the disable items in the popup wrapper, the warning icon will be shown.



DropDownList with popup

  1. In this example, we have used “font icon” for the warning message. Apply the following CSS




<style type="text/css" class="cssStyles">

    .control {

        margin-left: 20px;



    #btn {

        margin-left: 200px;



    .ctrllabel {

        padding-top: 15px;



    .e-ddl-popup div > ul li.e-disable:hover > span.e-msg:before {

        float: right;

        margin-top: 5px;

        content: "\e64c";

        color: red;





You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile