Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can i develop multi select checkbox inside DropDownList in asp.net
Kindly reply...
Posted

SQL
Please check it out here:

http://www.codeproject.com/KB/user-controls/Multiselect-Dropdown.aspx
 
Share this answer
 
by using RadComboBox its easy to develop checkbox inside dropdownlist
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


XML
<tr>
                <td>
                    Country Name
                </td>
                <td>
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    <telerik:RadComboBox ID="rcbMyList1" runat="server" DataTextField="country_Name"
                        DataValueField="country_Id" Width="200px" Height="200px" AutoPostBack="true">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" ToolTip='<%# Eval("country_Id") %>' Text='<%# Eval("country_Name") %>' />
                        </ItemTemplate>
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                    </telerik:RadComboBox>
                </td>
            </tr>


code behind:
C#
protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           DataTable dt = new DataTable();
           dt = CountryHandler.GetAll_Country();
           rcbMyList1.DataTextField = "country_Name";
           rcbMyList1.DataValueField = "country_Id";
           rcbMyList1.DataSource = dt;
           rcbMyList1.DataBind();

       }
   }
 
Share this answer
 
v2
 
Share this answer
 
Check this link.

DropDownList with checkboxes[^]
 
Share this answer
 

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