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. ToolStripMenuItems from SQL

ToolStripMenuItems from SQL

Scheduled Pinned Locked Moved C#
databasehelpquestion
4 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.
  • H Offline
    H Offline
    hobbsieoz
    wrote on last edited by
    #1

    Hi, Is there any way i can get a list of items i want added to a ToolStripMenu from SQL. I have a database which contains records that i enter using the application im developing. However, i want to be able to use the SELECT DISTINCT SQL command, to retrieve the names of something from a column, and put it into my toolstrip. Is there any way of doing this? Id be grateful of anybodys help :)

    J 1 Reply Last reply
    0
    • H hobbsieoz

      Hi, Is there any way i can get a list of items i want added to a ToolStripMenu from SQL. I have a database which contains records that i enter using the application im developing. However, i want to be able to use the SELECT DISTINCT SQL command, to retrieve the names of something from a column, and put it into my toolstrip. Is there any way of doing this? Id be grateful of anybodys help :)

      J Offline
      J Offline
      Jacky Yiu
      wrote on last edited by
      #2

      why don't you create the control when the sql load completed?

      H 1 Reply Last reply
      0
      • J Jacky Yiu

        why don't you create the control when the sql load completed?

        H Offline
        H Offline
        hobbsieoz
        wrote on last edited by
        #3

        How do i do that

        J 1 Reply Last reply
        0
        • H hobbsieoz

          How do i do that

          J Offline
          J Offline
          Jacky Yiu
          wrote on last edited by
          #4

          Create a function call "GenerateToolStripMenu()" or something, when you filled the data to the dataset, fire the function. e.g. for (int i = 0; i < database1DataSet.Table1.Rows.Count; i++) { menuStrip1.Items.Add(database1DataSet.Table1.Rows[i][%your_column_name_here%].ToString()); }

          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