Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
Sep 7, 1999

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()
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date