Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add combox in a grid row VFP 9.2 3

Status
Not open for further replies.

Eliasgitau

IS-IT--Management
Feb 19, 2008
11
KE
I would like to create a combox in a grid. How do i go about it. The Combox grid control will be populated with a data from one table in the database

Best Regards,
Joseph
 
If you have the book "1001 Things You Wanted to Know about Visual FoxPro," look in Chapter 6.

Tamar
 
Tamar,

Is your book a free online book? If not, may I suggest you read the bottom part of all replies message:

Tek-Tips posting policies said:
Promoting, selling, recruiting and student posting
are not allowed in the forums.
Posting Policies



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Joseph

1. Modify your form.
2. Modify the grid in question.
3. In the property sheet make sure your are editing the column you want to add a combo to. (The column part appear at the top)
4. Open your Form controls.
5. Reset the focus on the grid (Click on it)
6. Left-mouse on the combo in the from control and hold the left mouse and move it to the grid column.
7. Modify you column's current control to be the combobox rather than the textbox.
8. You may want to change the column's sparse setting, depending on what you need.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Dear Learned Friends,
I seem not to understand the follow of doing this.I
already have a form with grid which is running very well.I to change one column to have combox. The purpose of this form is to enter transactions. I want the combox to be populated from a table in the database.
Thanks in Advance
Joseph

 
Mike - the book I recommended isn't one I wrote. But I know it has exactly the answer to this question.

Tamar
 
This is how I usually do this:
First, I drop a combobox on the form somewhere and get it setup with the proper table. Make sure that it works at run time.

Next, I set the properties page so that the textbox I am trying to replace in the grid is listed. Click my mouse back on the grid to set the focus back to my form and then press the delete key. This should delete the textbox from the column in the grid.

Finally, I click on the combobox that I have setup, edit menu then copy (Ctl C). Right click on grid and select edit, click my cursor where the combobox would go, then select edit, paste (Ctl V). The combobox should then appear where the textbox once was. Yu can then delete the other combobox from the form.

As Mike said, you may need to mess with the sparse setting to get it to work properly.

Hope that helps!

Ed
 
I would like to create a combox in a grid. How do i go about it. The Combox grid control will be populated with a data from one table in the database

You can download the white paper and sample code from my conference session entitled "How to put a combo in a grid".

You will find it on the Tools and utilities page of my web site.


Marcia G. Akins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top