I am using Load On Demand Dropdown in Select2. I need to set the dropdown value selected using jquery. I was trying the below code but It doesnt seems to be working. Anybody have any idea about how to achieve this.
Code
$("#ddl").select2("data", { id: 1, text: "India" });
I found the way to set the selected value for Select2 remote dropdown. Use the below code to make it working.
Code