{"id":41,"date":"2011-02-11T11:26:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=41"},"modified":"2011-02-11T11:26:00","modified_gmt":"1970-01-01T00:00:00","slug":"jquery-kullanarak-asp-net-dropdownlist-kontrolunu-multi-select-listbox-a-cevirme","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2011\/02\/11\/jquery-kullanarak-asp-net-dropdownlist-kontrolunu-multi-select-listbox-a-cevirme\/","title":{"rendered":"jQuery Kullanarak ASP.NET DropDownList Kontrol\u00fcn\u00fc Multi Select ListBox &#8216;a \u00c7evirme"},"content":{"rendered":"<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\nnormal;mso-layout-grid-align:none;text-autospace:none\">Bazen bir sayfada DropDownList<span style=\"mso-spacerun:yes\">&nbsp; <\/span>kullandigimizda, sadece bir item se&ccedil;imine bagli kalmak istemeyiz. Mesela bir arama kriteri i&ccedil;in &uuml;r&uuml;n grubu ararken 2-3 grupta birden aramak gerekebilir ve biz gruplarimizi DropDownList&#8217;e getirmisizdir. DropDownList&#8217; de &ccedil;oklu item se&ccedil;me sansimiz yok. Bu y&uuml;zden eger birden fazla item se&ccedil;mek istiyorsak &ouml;zel olarak kod yazmamiz gerekecek. Bu islem i&ccedil;in izlenebilecek farkli y&ouml;ntemler var. Biz bu makalede ListBox kontrol&uuml;n&uuml;n&nbsp; &lsquo;SelectionMode&rsquo; &ouml;zelliginden yararlanacagiz. Elbetteki bunun i&ccedil;in de jQuery bize yardimci olacak.<br \/>\n<span style=\"font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;\">&nbsp;<o:p><\/o:p><\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\nnormal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:\n10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;\">jQuery sayesinde sadece bir butona<\/span> basip DropDownListimizden birden fazla item se&ccedil;ebilecegiz. &Ouml;ncelikle sayfamiza bir DropDown ekleyip i&ccedil;ine itemlarimizi ekliyoruz:<br style=\"mso-special-character:\nline-break\" \/>\n<!--[if !supportLineBreakNewLine]--><br style=\"mso-special-character:line-break\" \/>\n<!--[endif]--><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;\nmso-no-proof:yes\"><o:p><\/o:p><\/span><\/p>\n<table class=\"MsoTableGrid\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-left:5.4pt;background:#EEECE1;mso-background-themecolor:background2;\n    border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;\n    mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt\">\n    <tbody>\n        <tr style=\"mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes\">\n            <td width=\"594\" valign=\"top\" style=\"width:445.5pt;border:solid windowtext 1.0pt;\n            mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt\">\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:\n            yes\">&lt;<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">asp<\/span><span style=\"font-size:9.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\">:<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#A31515;mso-no-proof:\n            yes\">DropDownList<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            mso-no-proof:yes\"> <span style=\"color:red\">ID<\/span><span style=\"color:blue\">=&quot;DropDownList1&quot;<\/span>   <span style=\"color:red\">runat<\/span><span style=\"color:blue\">=&quot;server&quot;<\/span><span style=\"mso-spacerun:yes\">&nbsp; <\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">&lt;<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span> <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Item1&quot;<\/span> <span style=\"color:red\">Value<\/span><span style=\"color:blue\">=&quot;1&quot;&gt;&lt;\/<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">&lt;<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span> <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Item2&quot;<\/span> <span style=\"color:red\">Value<\/span><span style=\"color:blue\">=&quot;2&quot;&gt;&lt;\/<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">&lt;<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span> <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Item3&quot;<\/span> <span style=\"color:red\">Value<\/span><span style=\"color:blue\">=&quot;3&quot;&gt;&lt;\/<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">&lt;<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span> <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Item4&quot;<\/span> <span style=\"color:red\">Value<\/span><span style=\"color:blue\">=&quot;4&quot;&gt;&lt;\/<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">&lt;<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span> <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Item5&quot;<\/span> <span style=\"color:red\">Value<\/span><span style=\"color:blue\">=&quot;5&quot;&gt;&lt;\/<\/span><span style=\"color:#A31515\">asp<\/span><span style=\"color:blue\">:<\/span><span style=\"color:#A31515\">ListItem<\/span><span style=\"color:blue\">&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:\n            yes\">&lt;\/<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">asp<\/span><span style=\"font-size:9.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\">:<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#A31515;mso-no-proof:\n            yes\">DropDownList<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            color:blue;mso-no-proof:yes\">&gt;<\/span><span style=\"font-size:10.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\"><o:p><\/o:p><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\nnormal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:\n10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\"><o:p>&nbsp;<\/o:p><\/span><\/p>\n<p class=\"MsoNormal\">Daha sonra sayfamiza 2 adet buton ekliyoruz. Birincisi DropDownListimizi istedigimiz zaman multi select moda d&ouml;n&uuml;st&uuml;rmek i&ccedil;in. Ikincisi de Se&ccedil;tigimiz itemlari ekrana<span style=\"mso-spacerun:yes\">&nbsp; <\/span>yazmak i&ccedil;in:<\/p>\n<table class=\"MsoTableGrid\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-left:5.4pt;background:#EEECE1;mso-background-themecolor:background2;\n    border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;\n    mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt\">\n    <tbody>\n        <tr style=\"mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes\">\n            <td width=\"594\" valign=\"top\" style=\"width:445.5pt;border:solid windowtext 1.0pt;\n            mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt\">\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:\n            yes\">&lt;<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">asp<\/span><span style=\"font-size:9.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\">:<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#A31515;mso-no-proof:\n            yes\">Button<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            mso-no-proof:yes\"> <span style=\"color:red\">ID<\/span><span style=\"color:blue\">=&quot;btnConvert&quot;<\/span>   <span style=\"color:red\">runat<\/span><span style=\"color:blue\">=&quot;server&quot;<\/span>   <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;MultiSecelt   List&#8217;e &ccedil;evir&quot;<\/span> <span style=\"color:red\">ToolTip<\/span><span style=\"color:blue\">=&quot;&Ccedil;evirmek i&ccedil;in tikla&quot;<\/span> <span style=\"color:blue\">\/&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:\n            yes\">&lt;<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">asp<\/span><span style=\"font-size:9.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\">:<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#A31515;mso-no-proof:\n            yes\">Button<\/span><span style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;\n            mso-no-proof:yes\"> <span style=\"color:red\">ID<\/span><span style=\"color:blue\">=&quot;btnMulti&quot;<\/span>   <span style=\"color:red\">runat<\/span><span style=\"color:blue\">=&quot;server&quot;<\/span>   <span style=\"color:red\">Text<\/span><span style=\"color:blue\">=&quot;Ctrl tusu   ile se&ccedil;ip Butona tiklayin&quot;<\/span> <span style=\"color:red\">ToolTip<\/span><span style=\"color:blue\">=&quot;se&ccedil;ilen itemlari g&ouml;rmek i&ccedil;in tiklayin&quot;<\/span> <span style=\"color:blue\">\/&gt;<\/span><\/span><span style=\"font-size:10.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\"><o:p><\/o:p><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;line-height:115%;font-family:\n&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><o:p><\/o:p><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;line-height:115%;font-family:\n&quot;Courier New&quot;;mso-no-proof:yes\">Evet simdi asil islemi yapacak olan koda, yani jquery kodlarina geldi sira:<o:p><\/o:p><\/span><\/p>\n<table class=\"MsoTableGrid\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-left:5.4pt;background:#EEECE1;mso-background-themecolor:background2;\n    border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;\n    mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt\">\n    <tbody>\n        <tr style=\"mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes\">\n            <td width=\"594\" valign=\"top\" style=\"width:445.5pt;border:solid windowtext 1.0pt;\n            mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt\">\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:\n            yes\">&lt;<\/span><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">script<\/span><span style=\"font-size:10.0pt;\n            font-family:&quot;Courier New&quot;;mso-no-proof:yes\"> <span style=\"color:red\">type<\/span><span style=\"color:blue\">=&quot;text\/javascript&quot;&gt;<o:p><\/o:p><\/span><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span>$(<span style=\"color:blue\">function<\/span>()   {<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">var<\/span>   $conv = $(<span style=\"color:#A31515\">&#8216;input[id$=btnConvert]&#8217;<\/span>);<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:blue\">var<\/span>   $multi = $(<span style=\"color:#A31515\">&#8216;input[id$=btnMulti]&#8217;<\/span>);<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-no-proof:\n            yes\">\/\/<span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ilk asamada 2. butonumuz   g&ouml;r&uuml;nmesin<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$multi.hide();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><o:p>&nbsp;<\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><o:p>&nbsp;<\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-no-proof:\n            yes\">\/\/DropDown&#8217;u Multiselect yapan fonksiyonumuz<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$conv.click(<span style=\"color:blue\">function<\/span>(e)   {<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>e.preventDefault();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$(<span style=\"color:#A31515\">&#8216;select[id$=DropDownList1]&#8217;<\/span>).attr(<span style=\"color:#A31515\">&quot;multiple&quot;<\/span>, <span style=\"color:#A31515\">&quot;multiple&quot;<\/span>);<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$conv.hide();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$multi.show();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>});<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><o:p>&nbsp;<\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-no-proof:\n            yes\">\/\/se&ccedil;tigimiz itemlari ekraya yazdiran fonksiyonumuz<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$multi.click(<span style=\"color:blue\">function<\/span>(e)   {<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>e.preventDefault();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$(<span style=\"color:#A31515\">&quot;#param&quot;<\/span>).empty();<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$(<span style=\"color:#A31515\">&#8216;select[id$=DropDownList1]   :selected&#8217;<\/span>).each(<span style=\"color:blue\">function<\/span>(sel) {<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>$(<span style=\"color:#A31515\">&quot;#param&quot;<\/span>).append($(<span style=\"color:blue\">this<\/span>).text() + <span style=\"color:#A31515\">&quot;&lt;br   \/&gt;&quot;<\/span>);<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>});<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>});<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span>});<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;\n            mso-no-proof:yes\">&lt;\/<\/span><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;\n            color:#A31515;mso-no-proof:yes\">script<\/span><span style=\"font-size:10.0pt;\n            font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes\">&gt;<o:p><\/o:p><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p class=\"MsoNormal\"><span style=\"mso-bidi-font-family:Calibri;mso-bidi-theme-font:\nminor-latin;mso-no-proof:yes\">Evet hepsi bu kadar.<span style=\"mso-spacerun:yes\">&nbsp; <\/span>Islem sonunda<span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span>dropdown&rsquo;in<span style=\"mso-spacerun:yes\">&nbsp; <\/span>daha d&uuml;zg&uuml;n g&ouml;r&uuml;nmesi i&ccedil;in style&rsquo;ini d&uuml;zenliyoruz:<o:p><\/o:p><\/span><\/p>\n<table class=\"MsoTableGrid\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin-left:5.4pt;background:#EEECE1;mso-background-themecolor:background2;\n    border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;\n    mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt\">\n    <tbody>\n        <tr style=\"mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes\">\n            <td width=\"594\" valign=\"top\" style=\"width:445.5pt;border:solid windowtext 1.0pt;\n            mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt\">\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#A31515;mso-no-proof:\n            yes\">.smallDiv<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\">{<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">background-color<\/span>:<span style=\"color:blue\">White<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">font-family<\/span>:<span style=\"color:blue\">&quot;Lucida Sans Unicode&quot;,<\/span> <span style=\"color:blue\">&quot;Lucida Grande&quot;,<\/span> <span style=\"color:blue\">Verdana,<\/span>   <span style=\"color:blue\">Arial<\/span>; <o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-tab-count:1\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">font-size<\/span>:<span style=\"color:blue\">12px<\/span>; <o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-tab-count:1\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">color<\/span>:<span style=\"color:blue\">#000000<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">width<\/span>:<span style=\"color:blue\">510px<\/span>; <o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">margin-left<\/span>:<span style=\"color:blue\">auto<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">margin-right<\/span>:<span style=\"color:blue\">auto<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">padding<\/span>:<span style=\"color:blue\">10px<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal;mso-layout-grid-align:none;text-autospace:none\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes\"><span style=\"mso-spacerun:yes\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color:red\">border<\/span>:<span style=\"color:blue\">solid<\/span> <span style=\"color:blue\">1px<\/span> <span style=\"color:blue\">#c6cfe1<\/span>;<o:p><\/o:p><\/span><\/p>\n            <p class=\"MsoNormal\" style=\"margin-bottom:0in;margin-bottom:.0001pt;line-height:\n            normal\"><span style=\"font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:\n            yes\">}<span style=\"color:blue\"><o:p><\/o:p><\/span><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;line-height:115%;font-family:\n&quot;Courier New&quot;;mso-no-proof:yes\"><o:p>&nbsp;<\/o:p><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"mso-bidi-font-family:Calibri;mso-bidi-theme-font:\nminor-latin;mso-no-proof:yes\">Evet hepsi bu kadar artik DropDownimiz hazir:<o:p><\/o:p><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"mso-fareast-language:TR;mso-no-proof:yes\"><!--[if gte vml 1]><v:shapetype\nid=\"_x0000_t75\" coordsize=\"21600,21600\" o:spt=\"75\" o:preferrelative=\"t\"\npath=\"m@4@5l@4@11@9@11@9@5xe\" filled=\"f\" stroked=\"f\">\n<v:stroke joinstyle=\"miter\" \/>\n<v:formulas>\n<v:f eqn=\"if lineDrawn pixelLineWidth 0\" \/>\n<v:f eqn=\"sum @0 1 0\" \/>\n<v:f eqn=\"sum 0 0 @1\" \/>\n<v:f eqn=\"prod @2 1 2\" \/>\n<v:f eqn=\"prod @3 21600 pixelWidth\" \/>\n<v:f eqn=\"prod @3 21600 pixelHeight\" \/>\n<v:f eqn=\"sum @0 0 1\" \/>\n<v:f eqn=\"prod @6 1 2\" \/>\n<v:f eqn=\"prod @7 21600 pixelWidth\" \/>\n<v:f eqn=\"sum @8 21600 0\" \/>\n<v:f eqn=\"prod @7 21600 pixelHeight\" \/>\n<v:f eqn=\"sum @10 21600 0\" \/>\n<\/v:formulas>\n<v:path o:extrusionok=\"f\" gradientshapeok=\"t\" o:connecttype=\"rect\" \/>\n<o:lock v:ext=\"edit\" aspectratio=\"t\" \/>\n<\/v:shapetype><v:shape id=\"Picture_x0020_1\" o:spid=\"_x0000_i1026\" type=\"#_x0000_t75\"\nstyle='width:426.75pt;height:117pt;visibility:visible;mso-wrap-style:square'>\n<v:imagedata src=\"file:\/\/\/C:\\Users\\msk\\AppData\\Local\\Temp\\msohtmlclip1\\01\\clip_image001.png\"\no:title=\"\" \/>\n<\/v:shape><![endif]--><!--[if !vml]--><img decoding=\"async\" loading=\"lazy\" width=\"569\" height=\"156\" v:shapes=\"Picture_x0020_1\" alt=\"\" src=\"\/yuklenendosyalar\/image\/seher\/multidrowdown_1.png\" \/><!--[endif]--><\/span><\/p>\n<p class=\"MsoNormal\"><o:p>&nbsp;<a href='www.yazilimmutfagi.com'>.<\/a><\/o:p><\/p>\n<p class=\"MsoNormal\"><span style=\"mso-fareast-language:TR;mso-no-proof:yes\"><!--[if gte vml 1]><v:shape\nid=\"Picture_x0020_2\" o:spid=\"_x0000_i1025\" type=\"#_x0000_t75\" style='width:429pt;\nheight:211.5pt;visibility:visible;mso-wrap-style:square'>\n<v:imagedata src=\"file:\/\/\/C:\\Users\\msk\\AppData\\Local\\Temp\\msohtmlclip1\\01\\clip_image003.png\"\no:title=\"\" \/>\n<\/v:shape><![endif]--><!--[if !vml]--><img decoding=\"async\" loading=\"lazy\" width=\"572\" height=\"282\" v:shapes=\"Picture_x0020_2\" alt=\"\" src=\"\/yuklenendosyalar\/image\/seher\/multidrowdown_2.png\" \/><!--[endif]--><\/span><\/p>\n<p class=\"MsoNormal\"><o:p>&nbsp;<\/o:p><\/p>\n<p class=\"MsoNormal\"><a target=\"_blank\" href=\"http:\/\/www.yazilimmutfagi.com\/demo\/multiselectdropdownlist\/multiselectdropdownlist.htm\">Demoyu buradan&nbsp; inceleyebilirsiniz.<\/a><\/p>\n<p class=\"MsoNormal\"><a href=\"\/yuklenendosyalar\/file\/seher\/MultiSelectDropDown List.rar\">Projenin kodlari burada.<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Bazen bir sayfada DropDownList  kullandigimizda, sadece bir item se&#231;imine bagli kalmak istemeyiz. Mesela bir arama kriteri i&#231;in &#252;r&#252;n grubu ararken 2-3 grupta birden aramak gerekebilir ve biz gruplarimizi DropDownList&#39;e getirmisizdir. DropDownList&#39; de &#231;oklu item se&#231;me sansimiz yok. Bu y&#252;zden eger birden fazla item se&#231;mek istiyorsak &#246;zel olarak kod yazmamiz gerekecek.<\/p>\n","protected":false},"author":525,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[407],"tags":[4997,5265,4162,4523],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/41"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/525"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}