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

drop down list help

Thread ID:

Created:

Updated:

Platform:

Replies:

119597 Jul 13,2015 03:00 AM Jul 14,2015 08:26 AM JavaScript 1
loading
Tags: ejDropDownList
melquecedec
Asked On July 13, 2015 03:00 AM

im a newbie in syncfusion please help me admin...see the attached image below

Attachment: ask_a32a4d6e.rar

Gobalakrishnan S [Syncfusion]
Replied On July 14, 2015 08:26 AM

Hi Melquecedec,
Thanks for using Syncfusion products,

We have prepared a sample as per your requirement (“Item selected in first dropdown should not be displayed in the second dropdown”).please check it.

Sample Location

In the above provided sample we have bounded the checkChange event to the first dropdown. The event will trigger when change the checkbox state in the first dropdown list.


  // Creating First DropDown list

            $('#firstDayList').ejDropDownList({

                dataSource: DayList,

                fields: { text: "text", value: "text" },

                showCheckbox: true,

                allowMultiSelection: true,

                // Trigger when ever the check box state has been changed.

                checkChange:"onChange"

            });


In that event we have removed the selected item from the data source and reload the modified data source to the second dropdown through set model option as shown below


  function onChange() {


            var result = firstDrpdwn.model.text.split(",");

            var array = JSON.parse(JSON.stringify(DayList));


            // Find the selected element and removed

            for (i = 0; i < result.length; i++)              

                findAndRemove(array, 'text', result[i]);


            // Load the new DataSource to the second dropdownlist

            secondDrpdwn.option("dataSource", array)

        }



Please let us know, whether the provided sample helps to you
Regards,
Gobalakrishnan S

CONFIRMATION

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.

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.

;