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. ComboBox Column

ComboBox Column

Scheduled Pinned Locked Moved C#
databasequestionannouncement
6 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.
  • S Offline
    S Offline
    spankyleo123
    wrote on last edited by
    #1

    Hi , I have a datagridview(dgv) populating data from the database. The dgv also has a checkbox column to select rows and the form has a update button to update the selected rows. I want to change the dgv column to a combobox column to allow the users to select from the dropdown and update the value of the column. How can i achieve this,, I hope this makes sense. Thanks,.

    A 1 Reply Last reply
    0
    • S spankyleo123

      Hi , I have a datagridview(dgv) populating data from the database. The dgv also has a checkbox column to select rows and the form has a update button to update the selected rows. I want to change the dgv column to a combobox column to allow the users to select from the dropdown and update the value of the column. How can i achieve this,, I hope this makes sense. Thanks,.

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      This[^] might be of some assistance.

      Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
      Honestly. It's the honest ones you want to watch out for...

      S 1 Reply Last reply
      0
      • A Abhinav S

        This[^] might be of some assistance.

        Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
        Honestly. It's the honest ones you want to watch out for...

        S Offline
        S Offline
        spankyleo123
        wrote on last edited by
        #3

        Thanks for it, But i would like to convert the dgv column into combobox column when the checkbox is checked for a particular row. (C# Please) how to convert dgv column to dgv combobox column which shows the drplist items as in the table.

        A 1 Reply Last reply
        0
        • S spankyleo123

          Thanks for it, But i would like to convert the dgv column into combobox column when the checkbox is checked for a particular row. (C# Please) how to convert dgv column to dgv combobox column which shows the drplist items as in the table.

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #4

          spankyleo123 wrote:

          convert the dgv column into combobox column

          As a thought, will setting the visibility help you out? You cannot convert a column into a combobox - you can show and hide different user controls.

          Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
          Honestly. It's the honest ones you want to watch out for...

          S 1 Reply Last reply
          0
          • A Abhinav S

            spankyleo123 wrote:

            convert the dgv column into combobox column

            As a thought, will setting the visibility help you out? You cannot convert a column into a combobox - you can show and hide different user controls.

            Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
            Honestly. It's the honest ones you want to watch out for...

            S Offline
            S Offline
            spankyleo123
            wrote on last edited by
            #5

            yeah i tried something like this dgv.Columns[6].Visible = false; testComboColumn.Visible = true; testComboColumn.DataSource = tmx.tbTest; testComboColumn.DisplayMember = "Text"; testComboColumn.ValueMember = "ID"; is it possible to show the combobox list only for the select row?

            A 1 Reply Last reply
            0
            • S spankyleo123

              yeah i tried something like this dgv.Columns[6].Visible = false; testComboColumn.Visible = true; testComboColumn.DataSource = tmx.tbTest; testComboColumn.DisplayMember = "Text"; testComboColumn.ValueMember = "ID"; is it possible to show the combobox list only for the select row?

              A Offline
              A Offline
              Abhinav S
              wrote on last edited by
              #6

              AFAIK, you should be creating separate instances of the combobox, one for each row of your datagridview.

              Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
              Honestly. It's the honest ones you want to watch out for...

              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