We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


creat grids with cursors

Medium Priority
Last Modified: 2012-05-11
I have a set of grids that depend between each other, and i must create a cursor to second grid with the user selection on ther first grid. The problem is that the grid headers disappear and in their places appear the cursor fields.
How can i solv this problem?
Watch Question

Cyril JoudiehFounder, Software Engineer, Data Scientist

You can use the same table or cursor but under a different alias and it can be filtered.

USE table1 AGAIN IN 0 ALIAS table2.
SELECT table2
SET FILTER TO selected

Like this the two grids work independently from each other and the grid columns won't disappear.

Or you can create another table/cursor and append the records from the first

SELECT table2
APPEND FROM table1 WHERE selected.


this solution didn´t solve the problem, the tables has a larger struture and the set filt is´t efficient.
Founder, Software Engineer, Data Scientist
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Olaf DoschkeSoftware Developer

The visual problem you have with grid headers is called grid reconstruction.

Before you create the cursor for the secondary grid (again), set it's recordsource = "" and after you created the cursor set it back to the alias name.

If you don't do that the grid loses columns detail information and rebuilds. And when rebuilding, the headers caption are the field names of the cursor.

Bye, Olaf.

select * from table1 where 1=2 into cursor table2_dummy
thisform.grid2.recordsource = "table2_dummy"
select * from table1 where "insert real condition here" into cursor table2
thisform.grid2.recordsource = "table2"
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.