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. problem with datagridview in windows application

problem with datagridview in windows application

Scheduled Pinned Locked Moved C#
databasehelp
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.
  • A Offline
    A Offline
    Arun kumar Gautam
    wrote on last edited by
    #1

    I hav a datagridviewview in windows application whose column names are set from the fron end i setted their propertyname also cause i wanna to bind it with database, just like as Name Address Admin Delhi so m wanna tht as i will click on address cell of any row there is one combobox will show who is binded with database and as i will click on another row, the previous row will be show normally as a textboxcolumn and currentcell with show as a combobox column who will also binded with database

    L 1 Reply Last reply
    0
    • A Arun kumar Gautam

      I hav a datagridviewview in windows application whose column names are set from the fron end i setted their propertyname also cause i wanna to bind it with database, just like as Name Address Admin Delhi so m wanna tht as i will click on address cell of any row there is one combobox will show who is binded with database and as i will click on another row, the previous row will be show normally as a textboxcolumn and currentcell with show as a combobox column who will also binded with database

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I've read your post a couple of times, but I can't find a question or find at which point you got stuck. Can you explain what behaviour you were expecting, and the actual results? With a part of the code to demonstrate the problem?

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      A 1 Reply Last reply
      0
      • L Lost User

        I've read your post a couple of times, but I can't find a question or find at which point you got stuck. Can you explain what behaviour you were expecting, and the actual results? With a part of the code to demonstrate the problem?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        A Offline
        A Offline
        Arun kumar Gautam
        wrote on last edited by
        #3

        Hello Sir, Look i have a datagridview who is binded with database and shows those values Name Address admin Delhi adam India as i'm going to click on delhi my datagridview will show a combobox on click of it and shows a list of cities from database and after selecting any value from combobox i'm moving toward next row so as i'm going to next row m wanna tht combox will convert into textboxcolumn again thts the problem happening with me. Hope so tht now u can understand my problem...

        L 1 Reply Last reply
        0
        • A Arun kumar Gautam

          Hello Sir, Look i have a datagridview who is binded with database and shows those values Name Address admin Delhi adam India as i'm going to click on delhi my datagridview will show a combobox on click of it and shows a list of cities from database and after selecting any value from combobox i'm moving toward next row so as i'm going to next row m wanna tht combox will convert into textboxcolumn again thts the problem happening with me. Hope so tht now u can understand my problem...

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Arun kumar Gautam wrote:

          Hope so tht now u can understand my problem...

          Sounds more like a specification than a problem. You can add a DataGridViewComboBoxColumn[^] to the DataGridViews "Columns" collection. Also note;

          From MSDN[^]

          With the DataGridViewComboBoxColumn, you can display a column of cells that contain drop-down list boxes. This is useful for data entry in fields that can only contain particular values, such as the Category column of the Products table in the Northwind sample database. [...] Combo box columns are not generated automatically when data-binding a DataGridView control. To use combo box columns, you must create them manually and add them to the collection returned by the Columns property.

          Samples are here[^], walktroughs and howto's over here[^]. Hope that helps to get you started :)

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

          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