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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Items From Combo Box In A Grid

Status
Not open for further replies.

Eliasgitau

IS-IT--Management
Feb 19, 2008
11
KE
Dear Learned Friends,
I created a combo box in a grid. when selecting data on the combo box the system returns the below error.
Record is not Locked.
Below is my controlsource
***Grid
column1: controlsource=jobestimate.prodname

***Combo Box
BoundColumn = 1
ColumnCount = 1
ColumnWidths = 75
ControlSource = jobestimate.prodname
RowSourceType = 6-Fields
RowSource = products.prodname
Style = 2 - Dropdown List
Thanks in advance for any help

Joseph


 
I managed the above.
Now I have another problem. After selecting items in one row the value of a calculated cell is not clearing after moving to the next row. in my grid i have amount, vat and total column. when i type the amount and select the vat
from the combo box. the system calculates the total amount automatically.But when i move to row2 the calculated figure in row 1 moves to row2. I have struggled alot to fix it but to no avail.

Best regards,
Joseph


 
Joseph,

Where are you storing the result of the calculation? If you are placing it directly in the Value property of the Textbox object in the Total column, that would produce the behaviour you are seeing.

A better way is to store it in a field in the cursor or table to which the grid is bound, and to ensure that the ControlSource of the Total column points to that field.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top