Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i taken one combobox, panel and in panel i took label

i need to select dropdown list in multiples

What I have tried:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace MultiselectDropdownlist
{
    public partial class Form1 : Form
    {
        public bool chk = false;
        public Form1()
        {
            InitializeComponent();
            Loadnamesofcountry();
            displaypanel.Visible = false;
           
        }

        private void Loadnamesofcountry()
        {
            cmbCountrylist.Items.Add("India");
            cmbCountrylist.Items.Add("US");
            cmbCountrylist.Items.Add("UK");
            cmbCountrylist.Items.Add("Switzerland");
            cmbCountrylist.Items.Add("Brezil");
        }

        private void cmbCountrylist_SelectedIndexChanged(object sender, EventArgs e)
        {
         
            lblOutput.Text = cmbCountrylist.Text;
     
        }
Posted
Updated 21-Oct-20 20:52pm

1 solution

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