C# Tutorial 88: How to Search Listbox and get all matches using C#

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 36

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  11 років тому +3

    • @kuronoob
      @kuronoob 3 роки тому

      this is revolutionary, no text. but yes :)

  • @ThrowGames
    @ThrowGames 11 років тому

    Exelent videotutorials....

  • @Rahul_private9545
    @Rahul_private9545 3 роки тому

    Really good

  • @zaidoonjabbar8024
    @zaidoonjabbar8024 9 років тому

    Thanks a lot for your video. it is very good and basic.

  • @polasanderson6353
    @polasanderson6353 11 років тому +1

    This is exactly what i want ;)
    I have a question how to found items from one listbox to another ?

  • @Cannolt
    @Cannolt 11 років тому

    With what program do you use to create these kind of things? (soz sorry im new kinda :D)

  • @NimishP
    @NimishP 3 роки тому

    Is there a way to shrink the items in the list box as we start typing in the search box and not use search box button.

  • @Some1_Some1_Some1_Some1
    @Some1_Some1_Some1_Some1 8 років тому +5

    Why tf do you use for(int i = listBox1.Items.Count - 1; i >= 0; i--) ?
    for(int i = 0; i < listBox1.Items.Count; i++) is easier to understand and makes more sense.
    Also, this isn't a "Search Listbox". It just selects the first item containing the text in the textbox.

    • @farukborann
      @farukborann 5 років тому

      Because if you use " for(int i = 0; i < listBox1.Items.Count; i++) " this selects the last element found . but ı want to select firt element found . (from the top of the list)

  • @NazrulYo
    @NazrulYo 11 років тому

    Your tutorial all good!!!!

  • @serkanozkani
    @serkanozkani 8 років тому

    Thank you. It is very informative and kidn of you. Could you also make it dynamic items. while we typing its trim the unsearched items?

  • @Cannolt
    @Cannolt 11 років тому

    also one more thing, is visual studio 2010 free or do I need to pay for it?

  • @SuperStomptheyard
    @SuperStomptheyard 11 років тому

    great , what did u do to can upload videos with duration>15:00 , please tell me :(

  • @JohnMacAlpine
    @JohnMacAlpine 11 років тому

    brilliant, thank you !!

  • @sandeep2cool
    @sandeep2cool 5 років тому

    Thank you so much

  • @jigishafijiwala1145
    @jigishafijiwala1145 6 років тому

    can't work :cmd.CommandType="select Customername from CustomerMst";
    pl. send me the other alternative

  • @Cannolt
    @Cannolt 11 років тому

    ahh... okay. Thanks for Informing that for me :)

  • @codenamenomadman6034
    @codenamenomadman6034 4 роки тому

    Can do it without button click search ?

  • @juliancastelan9664
    @juliancastelan9664 5 років тому

    it did not let me just paste the entire list into the listbox, it was only pasting one item. How did he just paste it? I had to write it into the code page.

  • @ThrowGames
    @ThrowGames 11 років тому

    what about SOAP or Agile Scrum?

  • @juliancastelan9664
    @juliancastelan9664 5 років тому +1

    {
    InitializeComponent();
    string[] countryList = {"Afghanistan",
    "Åland Islands",
    "Albania",
    "Algeria",
    "American Samoa",
    "Andorra",
    "Angola",
    "Anguilla",
    "Antarctica",
    "Antigua and Barbuda",
    "Argentina",
    "Armenia",
    "Aruba",
    "Australia",
    "Austria",
    "Azerbaijan",
    "Bahamas",
    "Bahrain",
    "Bangladesh",
    "Barbados",
    "Belarus",
    "Belgium",
    "Belize",
    "Benin",
    "Bermuda",
    "Bhutan",
    "Bolivia (Plurinational State of)",
    "Bonaire, Sint Eustatius and Saba",
    "Bosnia and Herzegovina",
    "Botswana",
    "Bouvet Island",
    "Brazil",
    "British Indian Ocean Territory",
    "United States Minor Outlying Islands",
    "Virgin Islands (British)",
    "Virgin Islands (U.S.)",
    "Brunei Darussalam",
    "Bulgaria",
    "Burkina Faso",
    "Burundi",
    "Cambodia",
    "Cameroon",
    "Canada",
    "Cabo Verde",
    "Cayman Islands",
    "Central African Republic",
    "Chad",
    "Chile",
    "China",
    "Christmas Island",
    "Cocos (Keeling) Islands",
    "Colombia",
    "Comoros",
    "Congo",
    "Congo (Democratic Republic of the)",
    "Cook Islands",
    "Costa Rica",
    "Croatia",
    "Cuba",
    "Curaçao",
    "Cyprus",
    "Czech Republic",
    "Denmark",
    "Djibouti",
    "Dominica",
    "Dominican Republic",
    "Ecuador",
    "Egypt",
    "El Salvador",
    "Equatorial Guinea",
    "Eritrea",
    "Estonia",
    "Ethiopia",
    "Falkland Islands (Malvinas)",
    "Faroe Islands",
    "Fiji",
    "Finland",
    "France",
    "French Guiana",
    "French Polynesia",
    "French Southern Territories",
    "Gabon",
    "Gambia",
    "Georgia",
    "Germany",
    "Ghana",
    "Gibraltar",
    "Greece",
    "Greenland",
    "Grenada",
    "Guadeloupe",
    "Guam",
    "Guatemala",
    "Guernsey",
    "Guinea",
    "Guinea-Bissau",
    "Guyana",
    "Haiti",
    "Heard Island and McDonald Islands",
    "Holy See",
    "Honduras",
    "Hong Kong",
    "Hungary",
    "Iceland",
    "India",
    "Indonesia",
    "Côte d'Ivoire",
    "Iran (Islamic Republic of)",
    "Iraq",
    "Ireland",
    "Isle of Man",
    "Israel",
    "Italy",
    "Jamaica",
    "Japan",
    "Jersey",
    "Jordan",
    "Kazakhstan",
    "Kenya",
    "Kiribati",
    "Kuwait",
    "Kyrgyzstan",
    "Lao People's Democratic Republic",
    "Latvia",
    "Lebanon",
    "Lesotho",
    "Liberia",
    "Libya",
    "Liechtenstein",
    "Lithuania",
    "Luxembourg",
    "Macao",
    "Macedonia (the former Yugoslav Republic of)",
    "Madagascar",
    "Malawi",
    "Malaysia",
    "Maldives",
    "Mali",
    "Malta",
    "Marshall Islands",
    "Martinique",
    "Mauritania",
    "Mauritius",
    "Mayotte",
    "Mexico",
    "Micronesia (Federated States of)",
    "Moldova (Republic of)",
    "Monaco",
    "Mongolia",
    "Montenegro",
    "Montserrat",
    "Morocco",
    "Mozambique",
    "Myanmar",
    "Namibia",
    "Nauru",
    "Nepal",
    "Netherlands",
    "New Caledonia",
    "New Zealand",
    "Nicaragua",
    "Niger",
    "Nigeria",
    "Niue",
    "Norfolk Island",
    "Korea (Democratic People's Republic of)",
    "Northern Mariana Islands",
    "Norway",
    "Oman",
    "Pakistan",
    "Palau",
    "Palestine, State of",
    "Panama",
    "Papua New Guinea",
    "Paraguay",
    "Peru",
    "Philippines",
    "Pitcairn",
    "Poland",
    "Portugal",
    "Puerto Rico",
    "Qatar",
    "Republic of Kosovo",
    "Réunion",
    "Romania",
    "Russian Federation",
    "Rwanda",
    "Saint Barthélemy",
    "Saint Helena, Ascension and Tristan da Cunha",
    "Saint Kitts and Nevis",
    "Saint Lucia",
    "Saint Martin (French part)",
    "Saint Pierre and Miquelon",
    "Saint Vincent and the Grenadines",
    "Samoa",
    "San Marino",
    "Sao Tome and Principe",
    "Saudi Arabia",
    "Senegal",
    "Serbia",
    "Seychelles",
    "Sierra Leone",
    "Singapore",
    "Sint Maarten (Dutch part)",
    "Slovakia",
    "Slovenia",
    "Solomon Islands",
    "Somalia",
    "South Africa",
    "South Georgia and the South Sandwich Islands",
    "Korea (Republic of)",
    "South Sudan",
    "Spain",
    "Sri Lanka",
    "Sudan",
    "Suriname",
    "Svalbard and Jan Mayen",
    "Swaziland",
    "Sweden",
    "Switzerland",
    "Syrian Arab Republic",
    "Taiwan",
    "Tajikistan",
    "Tanzania, United Republic of",
    "Thailand",
    "Timor-Leste",
    "Togo",
    "Tokelau",
    "Tonga",
    "Trinidad and Tobago",
    "Tunisia",
    "Turkey",
    "Turkmenistan",
    "Turks and Caicos Islands",
    "Tuvalu",
    "Uganda",
    "Ukraine",
    "United Arab Emirates",
    "United Kingdom of Great Britain and Northern Ireland",
    "United States of America",
    "Uruguay",
    "Uzbekistan",
    "Vanuatu",
    "Venezuela (Bolivarian Republic of)",
    "Viet Nam",
    "Wallis and Futuna",
    "Western Sahara",
    "Yemen",
    "Zambia",
    "Zimbabwe"};
    foreach (string country in countryList)
    listBox1.Items.Add(country);

  • @Cannolt
    @Cannolt 11 років тому

    it doesn't matter what version? I mean 2010,2011,2012 etc...?

  • @anasamati
    @anasamati 11 років тому

    there is only VS 2010 and 2012
    VS 2010 works in Win7 and Win8
    VS 2012 only works in Win8 and it has the feature of making windows 8 apps
    The video publisher is using vs 2010.

  • @DerKrazyKrautGaming
    @DerKrazyKrautGaming 9 років тому

    thanks!

  • @maisumdev
    @maisumdev 4 роки тому

    thX

  • @denistarasov5196
    @denistarasov5196 8 років тому

    hi there can RTF?

  • @samh6981
    @samh6981 8 років тому

    helpful

  • @AetherDen
    @AetherDen 7 років тому +1

    WTF where did you learn how to "Not" write code

  • @TERIHAX
    @TERIHAX 4 роки тому

    But i have to be precise i want to search even if the spelling is wrong

  • @sethakkhum8673
    @sethakkhum8673 10 років тому

    why it not working in C# 2010

  • @anasamati
    @anasamati 11 років тому

    Visual Studio 2010

  • @SirajMSaha
    @SirajMSaha 8 років тому

    this is not working in number's case