Solved

Dbgrid with dbcombobox as a column

Posted on 2002-04-05
7
249 Views
Last Modified: 2010-04-04
I am writing an application which uses a dbgrid and
trying to align dbcomboboxs with each row in the grid.

What would be great is if there were a component that would allow me to assign a column as dbcomboboxs and each
cell in that column would allow me to make a selection based upon the info supplied from another column.  

Is there anything like this?  If not does anyone have a suggestion on an easier way to approach this.
0
Comment
Question by:brettawv
  • 4
  • 2
7 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 6921245
you can define lookup-fields in your dataset,
where you can define another dataset as lookupsource

the dbgrid will show then for this field
a combobox at editmode

meikl ;-)
0
 
LVL 3

Expert Comment

by:VSF
ID: 6921423
Double click your dataset,
add the fields you want
select the field you want to contain a dbcombobox
and set its lookup properties to the query that will fill the combobox lines!

Hope it helps!
VSF
www.victory.hpg.com.br
0
 

Author Comment

by:brettawv
ID: 6921659
I must not be setting up my lookup properties correctly because I still can't get it to work?  It doesn't show me a combobox.  Any ideas on what I'm missing.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:brettawv
ID: 6922136
OK, I got it working, but it won't change my selection when I click on a different option.  Is there a setting I'm missing?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6924991
? what different option?
0
 

Author Comment

by:brettawv
ID: 6938872
Hi kretzschmar,

I was having problems because of the way I was linking tables together.  I abandoned using the combobox inside the grid and I am using a dblistbox to list my options.  Things seem to be working out ok.  I am giving you the points since you were responded first to my question.

Thanks for your help, maybe I can use this somewhere in the future.
0
 

Author Comment

by:brettawv
ID: 6938873
Thanks again.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now