Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 118,309 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,703 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



combo box in datagrid

 
Reply to this topicStart new topic

combo box in datagrid, putting a combobox into a datagrid

rudeman76
post 2 Aug, 2008 - 09:50 AM
Post #1


New D.I.C Head

*
Joined: 30 Jul, 2008
Posts: 6

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
User is offlineProfile CardPM

Go to the top of the page


Martyr2
post 2 Aug, 2008 - 10:43 AM
Post #2


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 4,638



Thanked 120 times

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions


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!" decap.gif
User is offlineProfile CardPM

Go to the top of the page

dineeshd
post 2 Aug, 2008 - 02:50 PM
Post #3


D.I.C Addict

Group Icon
Joined: 30 Jun, 2008
Posts: 543



Thanked 15 times

Dream Kudos: 575
My Contributions


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

http://visualbasic.ittoolbox.com/groups/te...50?cv=expanded#
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/10/08 11:46AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month