devxlogo

Grid Disappears

Grid Disappears

Question:
I am calling one form from another. But after working in the called form, when I come back to the calling form, the grid that was there in the parent form is gone; instead, a white path comes. This is only when I call a form from another form that has a grid.

Why is this?

Answer:
The called form may be accidentally closing the alias that is the grid’s recordsource. If this is the problem, you may want to consider giving the grid form a private datasession. This is accomplished by setting the form’s DataSession property to 2, which insulates the alias of the grid form from being affected by any other form.

Another trick is to set the grid’s recordsource to itself. For example, in the Activate method of the grid form:

 this.oGrid.RecordSource = this.oGrid.RecordSource this.oGrid.Refresh()

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist