Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. find the value member in listbox

find the value member in listbox

Scheduled Pinned Locked Moved C#
regexhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohammed Elkholy
    wrote on last edited by
    #1

    hi , i have an idea i wish to do it i have a listbox it's disply member is StudentName and value member is StudentCode i want to write the student name in textbox and find this name in listbox by like examble i search for name Mohammed and i write in textbox Mo how can i select the first item match this thnx 4 help

    MD_NADA

    P 1 Reply Last reply
    0
    • M Mohammed Elkholy

      hi , i have an idea i wish to do it i have a listbox it's disply member is StudentName and value member is StudentCode i want to write the student name in textbox and find this name in listbox by like examble i search for name Mohammed and i write in textbox Mo how can i select the first item match this thnx 4 help

      MD_NADA

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Loop though the elements in the list. Call the String.StartsWith method on the display member for each element with the value entered in the listbox. If this method returns True for a particular item, the item begins with the text entered in the textbox.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups