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. Add Blank Line to dropdownlist

Add Blank Line to dropdownlist

Scheduled Pinned Locked Moved C#
question
3 Posts 3 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
    minniemooo
    wrote on last edited by
    #1

    I am populating my Dropdownlist using dataset DataTable t_table = new DataTable(); SqlDataAdapter adapt; SqlCommand cmd = new SqlCommand("SELECT distinct ID from TBL1",conn); adapt = new SqlDataAdapter(cmd); adapt.Fill(t_table); dsProj.Tables.Add(t_table); The staement does populate as expected but I want to insert a Blank Line First. How can I do this?

    M R 2 Replies Last reply
    0
    • M minniemooo

      I am populating my Dropdownlist using dataset DataTable t_table = new DataTable(); SqlDataAdapter adapt; SqlCommand cmd = new SqlCommand("SELECT distinct ID from TBL1",conn); adapt = new SqlDataAdapter(cmd); adapt.Fill(t_table); dsProj.Tables.Add(t_table); The staement does populate as expected but I want to insert a Blank Line First. How can I do this?

      M Offline
      M Offline
      Mark Churchill
      wrote on last edited by
      #2

      This was asked over here[^], roughly.

      Mark Churchill Director Dunn & Churchill Free Download:
      Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.

      1 Reply Last reply
      0
      • M minniemooo

        I am populating my Dropdownlist using dataset DataTable t_table = new DataTable(); SqlDataAdapter adapt; SqlCommand cmd = new SqlCommand("SELECT distinct ID from TBL1",conn); adapt = new SqlDataAdapter(cmd); adapt.Fill(t_table); dsProj.Tables.Add(t_table); The staement does populate as expected but I want to insert a Blank Line First. How can I do this?

        R Offline
        R Offline
        Ravenet
        wrote on last edited by
        #3

        Hi Guy This is easy just use insertAtRow() method to table, u can insert a blank row after bind to Combobox. thanks

        Cheers RRave MCTS,MCPD

        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