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. combobox in datagrid

combobox in datagrid

Scheduled Pinned Locked Moved Visual Basic
csshelptutorialquestion
3 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
    atul_moghe
    wrote on last edited by
    #1

    hi guys, i've datagrid in my windows form and i've implemented combobox in one of the datagrid column. Now my problem is tht when i click on tht text of the comboboxcolumn it converts into dropdown and if i click it again it opens and show me all the available values. so in this case to see and select the value i have to click it twice. but i need to do it with one click. how can i do tht. Or there is an another option but i dont know how to implement it. it is like when i bind my grid every row should have the combobox for a perticular column. ie. every combo should remain forever unlike in the normal case when it comes only when u try to edit a perticular row. plz give me some solution.. thnx in advance A R MOGHE.

    T 1 Reply Last reply
    0
    • A atul_moghe

      hi guys, i've datagrid in my windows form and i've implemented combobox in one of the datagrid column. Now my problem is tht when i click on tht text of the comboboxcolumn it converts into dropdown and if i click it again it opens and show me all the available values. so in this case to see and select the value i have to click it twice. but i need to do it with one click. how can i do tht. Or there is an another option but i dont know how to implement it. it is like when i bind my grid every row should have the combobox for a perticular column. ie. every combo should remain forever unlike in the normal case when it comes only when u try to edit a perticular row. plz give me some solution.. thnx in advance A R MOGHE.

      T Offline
      T Offline
      thebread
      wrote on last edited by
      #2

      ...so in this case to see and select the value i have to click it twice. but i need to do it with one click. how can i do tht. i've never done but try to handle the "VisibleChanged" event in your columnstyle and popup the combobox. ...it is like when i bind my grid every row should have the combobox for a perticular column. ie. every combo should remain forever unlike in the normal case when it comes only when u try to edit a perticular row. your DatagridComboboxColumn has one instance of your combobox and shows it until one cell will be edited. if you like to show the combobutton in each cell of your column you have to draw it you own. you can use system.Windows.Forms.ControlPaint.DrawComboButton in your onPaint method good luck

      A 1 Reply Last reply
      0
      • T thebread

        ...so in this case to see and select the value i have to click it twice. but i need to do it with one click. how can i do tht. i've never done but try to handle the "VisibleChanged" event in your columnstyle and popup the combobox. ...it is like when i bind my grid every row should have the combobox for a perticular column. ie. every combo should remain forever unlike in the normal case when it comes only when u try to edit a perticular row. your DatagridComboboxColumn has one instance of your combobox and shows it until one cell will be edited. if you like to show the combobutton in each cell of your column you have to draw it you own. you can use system.Windows.Forms.ControlPaint.DrawComboButton in your onPaint method good luck

        A Offline
        A Offline
        atul_moghe
        wrote on last edited by
        #3

        Thanks buddy for ur kind information, i really appriciate ur help.. A R MOGHE.

        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