Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Select sql and grid
Thread ID: 104345 Message ID: 104427 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Wednesday, August 16, 2006 1:23:42 PM         
   


setting RecordSource to "" will destroy all the properties of your grid. do as andy says.
RecordsourceType should be 1

> > > I have read your blog very carefully but there is something problem else i have tried by your way
> > > but when i set the following property
> > >
> > > THISFORMSET.Form11.Grid1.RecordSource = ""
> > >
> > > Then above Sql statement
> > >
> > > then
> > >
> > > THISFORMSET.Form11.Grid1.RecordSource = "tc_hdr_vw"
> > >
> > > but the following property is showing like the following
> > >
> > > THISFORMSET.Form11.Grid1.Column1.ControlSource = ""
> > >
> > > the above property i have set like this
> > >
> > > THISFORMSET.Form11.Grid1.Column1.ControlSource = "tc_hdr_vw.prnt"

> >
> > I am sorry, I do not understand you. If you are doing this the way I described then you should NOT be setting the grid's recordsource to an empty string!
> >
> > Create the (empty) cursor in the form Load()
> > Bind the grid to the empty cursor
> > Run the query into a different temporary cursor (in Init, or Setup or whereever you need it)
> > Zap the grid cursor and append from the temporary cursor
> > Delete the temporary cursor
> >
> > This works correctly in all scenarios and is the ONLY way to do it. If you are not doing these steps, in this order, there is nothing more to be said.
> >
> > Regards
> > Andy Kramek
> > Microsoft MVP (Visual FoxPro)
> > Tightline Computers Inc, Akron Ohio, USA

>
> i am setting the grid's recordsource to an empty string! like this, in this way is it correct ?
>
> THISFORMSET.Form11.Grid1.RecordSource = ""
>
> and as you tell above what is the RecordsourceType setting among 4 options
> and if i want to populate a cursor in a grid


ENTIRE THREAD

Select sql and grid Posted by Khurram Tahir @ 8/15/2006 9:55:34 AM
RE: Select sql and grid Posted by Jojo Sabino @ 8/15/2006 10:03:40 AM
RE: Select sql and grid Posted by Khurram Tahir @ 8/15/2006 12:40:17 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/15/2006 12:41:46 PM
RE: Select sql and grid Posted by Khurram Tahir @ 8/15/2006 1:28:59 PM
RE: Select sql and grid Posted by tushar @ 8/15/2006 5:33:31 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/16/2006 12:34:53 PM
RE: Select sql and grid Posted by Khurram Tahir @ 8/16/2006 12:44:54 PM
RE: Select sql and grid Posted by tushar @ 8/16/2006 1:23:42 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/17/2006 12:43:57 PM
RE: Select sql and grid Posted by Don Higgins @ 8/21/2006 6:25:33 PM