combo box in datagrid

putting a combobox into a datagrid

Page 1 of 1

2 Replies - 15059 Views - Last Post: 02 August 2008 - 02:50 PM Rate Topic: -----

#1 rudeman76  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 30-July 08

combo box in datagrid

Posted 02 August 2008 - 09:50 AM

Hi,
is there a way of putting a combobox inside a datagrid in vb6? i have a datagrid with 10 columns. I would like 2 of the columns to be comboboxes if possible. i would like these populated by a different table. Is this possible?

Rude
Is This A Good Question/Topic? 0
  • +

Replies To: combo box in datagrid

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4424
  • View blog
  • Posts: 12,293
  • Joined: 18-April 07

Re: combo box in datagrid

Posted 02 August 2008 - 10:43 AM

You can't put a combobox directly into the datagrid control. However most developers can make it look like it is by placing a listbox control over the top of the datagrid control and position it so that it sits right over one of the cells.

So give that a try and remember to keep the listbox on top of the datagrid at all times. You can use the "Buttonclick" event of the datagrid to set the visibility of the listbox and make it appear to the user that the column is a combobox.

You have to use a bit of smoke and mirrors on this but it is the way to do it.

Enjoy!

"At DIC we be datagrid controlling code ninjas... sit datagrid sit! Good datagrid!" :snap:
Was This Post Helpful? 0
  • +
  • -

#3 dineeshd  Icon User is offline

  • member icon

Reputation: 38
  • View blog
  • Posts: 619
  • Joined: 30-June 08

Re: combo box in datagrid

Posted 02 August 2008 - 02:50 PM

I had found a similar thread. May be usefull to you...... :rolleyes:

http://visualbasic.i...50?cv=expanded#
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1