Actually I have 2 problems in my code, here is the link to my jsFiddle Not Working Demo.
Problem 1: I can't drag and drop any item from one list to another.
Problem 2: After drag and drop will work, how can I change my specific item from array?
Here is my observable array:
self.customExportFileArray = ko.observableArray([
{
"IncludeInExportConversionTypesSelectList" :
[
{
"ConversionGroupID" : "1",
"Title" : "Quote Start - Auto"
},
{
"ConversionGroupID" : "2",
"Title" : "Quote Finish - Auto"
},
{
"ConversionGroupID" : "3",
"Title" : "Sales Data"
}
],
"ChooseFromConversionTypesSelectList" : [],
"FileName" : "Template1"
},
{
"IncludeInExportConversionTypesSelectList":
[
{
"ConversionGroupID" : "1",
"Title" : "Quote Start - Auto"
},
{
"ConversionGroupID" : "2",
"Title" : "Sales Data"
}
],
"ChooseFromConversionTypesSelectList":
[
{
"Title" : "Quote Finish - Auto"
}
],
"FileName" : "Template2"
}
]);
So, for example, I chose 'Template1' from my dropdown, selectedTemplate
property will takes second item from array and after I move items from left to the right sides and vise versa IncludeInExportConversionTypesSelectList
(right side of list) and ChooseFromConversionTypesSelectList
(left side of list) arrays should be updated, and clicking on Grab all data from specific template
button it should return me updated specific array (according to pre-selected dropdown control).
Does anyone know what am I doing wrong? Because I had working code before adding dropdown.
Any help would be highly appreciated.
Thanks in advance.