Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Sithu Kyaw
  Where is Sithu Kyaw?
 Yangon
 Myanmar
 Sithu Kyaw
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: Grid blank when reload the same form
Thread ID: 365756 Message ID: 365761 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Monday, December 31, 2012 10:02:51 AM         
   


> > I have a form with a grid. I released the grid cursor in Form.Destroy() or Form.Grid.Destroy()
> >
> > USE IN SELECT(THISFORM.Grid1.RecordSource)
> > 

> > The grid is blank when reloads the same form from the menu.
> > It also generates the error regarding with some grid properties, for example, I have the following code in Grid.Init()
> >
> > THIS.SetAll('DynamicBackColor', .......)
> > 

> > I got the error "Invalid expression DynamicBackColor..." when reloads the same form from the menu.
> > I think it is because the cursor got closed.
> > What am I wrong? When I remove the line USE IN SELECT, it is ok.
> > Why I cannot release the cursor at Form.Destroy() or Form.Grid.Destroy()?
> >

>
> What is the form's datasession, private or public? Where do you create the cursor for the grid?
>
> Regards
> Samir

I use Default Data Session.
Grid.Init() has the code adding the columns and THIS.RecordSource = ''
Form.Init() sets the record source to the grid.

I tried THIS.RecordSource = '' in Form.Init() as Tariq's suggest, but no success.

With Regards,
profile for Sithu on Stack Exchange, a network of free, community-driven Q&A sites

ENTIRE THREAD

Grid blank when reload the same form Posted by Sithu Kyaw @ 12/31/2012 8:26:49 AM
RE: Grid blank when reload the same form Posted by Tariq Mehmood @ 12/31/2012 8:52:30 AM
RE: Grid blank when reload the same form Posted by Samir H. @ 12/31/2012 9:44:41 AM
RE: Grid blank when reload the same form Posted by Sithu Kyaw @ 12/31/2012 10:02:51 AM
RE: Grid blank when reload the same form Posted by David Mustakim @ 12/31/2012 11:21:47 AM
RE: Grid blank when reload the same form Posted by Sithu Kyaw @ 12/31/2012 11:52:23 AM
RE: Grid blank when reload the same form Posted by David Mustakim @ 12/31/2012 12:00:48 PM
RE: Grid blank when reload the same form Posted by tushar @ 12/31/2012 11:30:41 AM
RE: Grid blank when reload the same form Posted by David Mustakim @ 12/31/2012 11:38:01 AM
RE: Grid blank when reload the same form Posted by Sithu Kyaw @ 12/31/2012 10:02:52 AM