hi all i am binding my dropdown with Jquery-Select2. Its working fine but now i need to Bind my Multi-Value selectBox by using Jquery-Select2.
My DropDwon
<div class="divright">
<select id="drp_Books_Ill_Illustrations"
class="leaderMultiSelctdropdown Books_Illustrations" name="drp_Books_Ill_Illustrations"
multiple="">
<option value=" ">No illustrations</option>
<option value="a">Illustrations</option>
<option value="b">Maps</option>
<option value="c">Portraits</option>
</select>
</div>
From this link http://ivaynberg.github.com/select2/ i am using Mutiple Value Select Box , I can Bind my dropdwon with
$("dropdownid").Select2()
its working fine, but now i need to get that selected value into my dropdown on edit mode So i am using this Example
$(".Books_Illustrations").select2("val", ["a", "c"]);
its working but how can i fix my choice, because user can choice anything So i can't write a,c statically thats why i need to bind my Selected value on Edit mode dynamically.
I think now you all are clear with my requirement. Please let me know if you need further clearance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…