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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. DataGridViewTextBoxColumn to DataGridViewComboBoxColumn Help...

DataGridViewTextBoxColumn to DataGridViewComboBoxColumn Help...

Scheduled Pinned Locked Moved Visual Basic
cssdatabasedesignhelptutorial
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.
  • V Offline
    V Offline
    vbDiggerz
    wrote on last edited by
    #1

    I wish to convert an existing column into a comboboxcolumn at run time. I've bound a datasource to a datagridview programmatically using the adapter.Fill(dataset) method. This fills my grid view but I want to change one of the columns, say column 2, to be a combobox column. I know how to do this by adding a new column or by using the designer at design time but neither of these help me. I need to do this programmitically at run time. I'm using VB2005. I'm trying to restrict the user's entries for this particular column in the database to a simple list. anyone could give a sample code to do this for me to study?? Please anybody..

    D 1 Reply Last reply
    0
    • V vbDiggerz

      I wish to convert an existing column into a comboboxcolumn at run time. I've bound a datasource to a datagridview programmatically using the adapter.Fill(dataset) method. This fills my grid view but I want to change one of the columns, say column 2, to be a combobox column. I know how to do this by adding a new column or by using the designer at design time but neither of these help me. I need to do this programmitically at run time. I'm using VB2005. I'm trying to restrict the user's entries for this particular column in the database to a simple list. anyone could give a sample code to do this for me to study?? Please anybody..

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You cannot change a column at runtime. Once the column has been created, that's it. It stays that way for the life of the column. You have to create a new column to replace the old one with.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      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