We need your code to tell what is missing.
You need to move the record pointer and oGrid.Refresh to refresh the grid.
Main Topics
Browse All TopicsFoxpro is killing me!!
I have a treeview, a grid, and a combo box.
The table has an id field, a description field, and a list field.
The treeview is populated from the table with the id field as the node id, and the desciption field as the node lable. The combobox control value is from the table, the values are from another table. The grid is populated from a query that filters the table based on whether or not the list field is populated.
I can populate the tree view. As I navigate around the tree view, I can use the node id to populate the combobox and if the node is in the grid move the pointer to that record.
Here's my problem. When I change the value in the combobox, I can't propogate that change down to the grid view. I've tried using the interactive change event of the combo box to do a refresh and setting the grid's recordsource equal to itself. It almost works, but the grid doens't show the change until after I move to a new node and change the combobox value again. It's basically one action behind. I'm not sure what I'm missing.
Also, I'd like to change the selected node in the tree view if the user selects a row in the gridview. I'm not sure which grid event to use to do that.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I create a cursor from the table that the combobox is bound to. This is what I currently have:
combobox1.controlsource = sms_xml.des_dbf
gridbox1.controlsource = "SELECT nodeid, node_des, des_dbf, des_fld, sec_code from sms_xml WHERE !EMPTY(des_dbf) INTO cursor activenodes"
gridbox1.controlsourcetype
combobox1.interactivechang
this.Parent.grid1.RecordSo
this.Parent.grid1.Refresh(
The change makes it to the gridview eventually just not immediately like I would expect it to.
I think tushar is on the right track about the buffering issue. But in interactivechange you don't yet have saved to the table, this is only done, after the valid event is passed.
Recreating the cursor you display in a grid is a bad idea. The grid will ract in blanking out, if you do that. One way is to do like you and make an sql statement the recordsource, but I doubt a refresh helps to requery the grid cursor by it's SQL Recordsource. I don't use that recordsourcetype, I'd rather select the data into a cursor and then bind the grid to that alias with recordsourcetype alias. Then when you need a refresh unbind the grid by setting recordsource empty, then redo the query, then set the grids recordsource back.
Bye, Olaf.
Business Accounts
Answer for Membership
by: CaptainCyrilPosted on 2009-06-25 at 11:31:56ID: 24714553
To trap user movement in the grid
AfterRowColChange