Multiselect DropDownList uncheckAll

I have Multiselect DropDownList with ShowCheckbox(true).
After update to version 15.3.0.33 function uncheckAll() forDropDownList stop working.

Any help is appreciated.

Thanks,

7 Replies

KR Keerthana Rajendran Syncfusion Team October 26, 2017 06:29 AM UTC

Hi Radoslaw,   
   
Thank you for contacting Syncfusion Support.   
   
We have checked the working of uncheckAll() method in latest version 15.3.0.33 with multiselect DropDownList. But, we were unable to reproduce the issue in our end and we have attached a sample for your reference. Please download the sample from:   
   
   
If the issue persists, please revert by modifying the above sample to reproduce the issue in our end. Also, share some additional information like error details or video to showcase the issue so that we can proceed further   
   
Regards,   
Keerthana.   
 



RS Radoslaw Szuban October 26, 2017 04:28 PM UTC

Hi Keerthana.  

Thank you for the attached sample. In this sample uncheckAll work fine. But when I add data binding in your project - uncheckAll stop working.

Please look at screencast: https://www.screencast.com/t/NaNpaOtnaMbx

My changes :

DropDownlistFeatures.cshtml :

@using SyncfusionMvcApplication1

@model SyncfusionMvcApplication1.ViewModels.DropdownlistViewModel

@{

    ViewBag.Title = "Dropdownlist";

    Layout = "~/Views/Shared/_Layout.cshtml";

}


<div id = "ControlRegion">

<div class="frame1">

        <div class="control">

            <div class="ctrllabel">

                Select a car</div>

         @Html.EJ().DropDownList("selectCar").Datasource(Model.ListItems).DropDownListFields(builder => builder.Value("Id").Text("Name")).ShowCheckbox().EnableRTL(false).Width("150px").HeaderTemplate("<div class='temp'><input id='check' type='checkbox'/></div>").ShowCheckbox(true).ClientSideEvents(clientEvent => clientEvent.Create("create")).MultiSelectMode(MultiSelectModeTypes.Delimiter)   

        </div>

    <br/>

  

 </div>

    <script>

        function create(args) {

            $("#check").ejCheckBox({ text: "Check All", change: "Change" });

        }

        function Change(args) {

            window.flag = true;

            var obj = $("#selectCar").ejDropDownList("instance");

            if (args.isChecked) obj.checkAll();

            else obj.uncheckAll();

            window.flag = false;

        }

    </script>

<br/><br/>

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

        .control

        {

            margin-left: 30px;

        }

        .ctrllabel

        {

            padding-top: 15px;

        }

        .temp {

                height: 30px;

                display: block;

                padding-left: 13px;

                padding-top: 5px;

                border-bottom: 1px solid #c8c8c8;

            }

            .e-chkbox-wrap .e-text {

                font-size: 14px;

                padding-left: 10px;

            }

</style>

</div>


Controller:

namespace SyncfusionMvcApplication1

{

    public partial class DropdownlistController: Controller

    {

        public ActionResult DropdownlistFeatures()

        {

            var viewModel = new DropdownlistViewModel();

            viewModel.ListItems = new List<Data>()

            {

                new Data(1, "Audi A4"),

                new Data(2, "Audi A5"),

                new Data(3, "Audi A6"),

                new Data(4, "Audi A7"),

            };

            return View(viewModel);

         } 

    }

}


Model:


public class DropdownlistViewModel

    {

        private List<Data> _listItems;

        public List<Data> ListItems

        {

            get { return _listItems; }

            set

            {

                _listItems = value;

            }

        }

    }


    public class Data

    {

        public Data(int id, string name)

        {

            Id = id;

            Name = name;

        }


        public int Id { get; set; }

        public string Name { get; set; }

    }


 



KR Keerthana Rajendran Syncfusion Team October 27, 2017 02:01 PM UTC

Hi Radoslaw, 
 
Thanks for sharing the code. 
 
We were able to reproduce the issue in our end. We suggest you to assign string value for value field of DropDownList  to resolve the issue as shown below  
 
   public ActionResult DropdownlistFeatures() 
        { 
            var viewModel = new DropdownlistViewModel(); 
 
            viewModel.ListItems = new List<Data>() 
 
            { 
 
                new Data("1", "Audi A4"), 
 
                new Data("2", "Audi A5"), 
 
                new Data("3", "Audi A6"), 
 
                new Data("4", "Audi A7"), 
 
            }; 
 
            return View(viewModel); 
         } 
      } 
 
    public class Data 
    { 
 
        public Data(string id, string name) 
        { 
 
            Id = id; 
 
            Name = name; 
 
        } 
 
        public string Id { get; set; } 
 
        public string Name { get; set; } 
 
 
    } 
 
 
We have modified our previous sample based on this. Please download the sample from: 
 
 
 
Regards, 
Keerthana. 



RS Radoslaw Szuban November 3, 2017 11:57 AM UTC

Thank you for help. Now it's working.



KR Keerthana Rajendran Syncfusion Team November 6, 2017 03:54 AM UTC

Hi Radoslaw, 
 
Thanks for your update. We are happy to hear that your issue has been resolved. Please get back to us if you require any further assistance on this. We will be happy to assist you. 
 
Regards, 
Keerthana. 



MT Megha Thimmappa May 27, 2019 01:37 PM UTC

Hello Team,

I am using Syncfusion dropdownlist with multiselect, I am seeing one issue with uncheck all when listitem count exceeds 70. When List items count is than 70 uncheck all works as expected. When it exceeds more than 70 uncheck all is not working as expected. Please help.


VK Vinoth Kumar Sundara Moorthy Syncfusion Team May 28, 2019 01:00 PM UTC

Hi Megha,

Good day to you. 

We have checked the reported issue by rendering DropDownList with 70 items. Check and Uncheck all option works fine in our end. We have prepared a live demo sample for your reference. Please refer to the below given link.

https://jsplayground.syncfusion.com/dv5n1isz 

Could you please check the above sample and if issue persists, provide proper replication steps and issue replicable sample? so that we can proceed further on this.

Regards,
Vinoth Kumar S


Loader.
Up arrow icon