Click here to Skip to main content
15,889,833 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written code like this to load selected values of one multi select into another multi select.
This is my view code
C#
var data = [
          { text: "Sunday", value: "1" },
          { text: "Monday", value: "2" },
          { text: "Tuesday", value: "3" },
          { text: "Wednesday", value: "4" },
          { text: "Thursday", value: "5" },
          { text: "Friday", value: "6" },
          { text: "Saturday", value: "7" },
            ];

            $("#BFD_FAREDAYS,#BFD_PROMOTIONALDAYS").kendoMultiSelect({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: data,
                placeholder: "Select"

            });
and i have written in on change event of first multiselect is like this
 $("#BFD_FAREDAYS").change(function (e) {
            
  var selectedValues = $("#BFD_FAREDAYS").data("kendoMultiSelect").value();
            
                       $("#BFD_PROMOTIONALDAYS").data("kendoMultiSelect").value(selectedValues);
            
        });
Posted
Updated 1-Oct-15 0:31am
v2
Comments
Palash Mondal_ 1-Oct-15 8:03am    
What is the issue are you having? Your code should work. you can also try $("#BFD_PROMOTIONALDAYS").data("kendoMultiSelect").value([1,2]) for testing.
Member 12008518 1-Oct-15 8:27am    
Thanku For writing.i have not included my problem properly.my issue is,selected item in first multi select is directly selecting in second multi select where as i need only selected data in first multi select should only appear in second multi select instead of showing all.
Palash Mondal_ 1-Oct-15 8:07am    
Working fine as shown in this demo: FIFFLE[^]
Member 12008518 1-Oct-15 8:27am    
Thanku For writing.i have not included my problem properly.my issue is,selected item in first multi select is directly selecting in second multi select where as i need only selected data in first multi select should only appear in second multi select instead of showing all.
Member 12008518 1-Oct-15 8:19am    
Thanku For writing.i have not included my problem properly.my issue is,selected item in first multi select is directly selecting in second multi select where as i need only selected data in first multi select should only appear in second multi select instead of showing all.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900