Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 Tags
Subject: RE: grids to display in text
Thread ID: 189128 Message ID: 189265 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Grids
Date: Thursday, August 14, 2008 7:29:28 AM         
   


> >
> > you can set controlSource property of your textboxes on your form
> >
> > e.g. RecordSource of your grid is "grdCursor"
> > then set textbox control source to that cursor
> >
> > thisform.text1.controlSource = grdCursor.fieldName
> > 

> > by doing this when user will navigate in grid your text box will contain the data
> > corresponding to the row selected in the grid and you don't need to use button to display
> >
> >
> > but if you want to display only when user hits the button then
> >
> >  thisform.text1.value = grdCursor.fieldName
> > * or
> >  thisform.text1.value = thisform.grid1.column1.text1.value
> > * and so on
> > 

> >
> >
> >
> > -----------------------------------------------------------------------------------------------
> > Regards
> > Surinder Singh
> > Email: sur200@indiatimes.com
> > Check my blog for details: http://weblogs.foxite.com/sur200
> > ----------------------------------------------------------------------------------------
> > *If you understand what you're doing, then you're not learning anything.
>
> Hi Surinder
> I think that work if and only if you put the code in AfterRowColChange
>
thisform.text1.refresh

> the textbox is not autorefresh control.
>
> Regards
> Yousfi Benameur

definitely you need to refresh your textboxes in AfterRowColChange.
PROCEDURE afterrowcolchange
 LPARAMETERS tnCol
  IF INLIST(this.RowColChange,1) && refresh only if row is changed, no need to execute code 
                                  && if user moves between columns.
    this.Parent.refresh()
  ENDIF  

-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email: sur200@indiatimes.com
Check my blog for details: http://weblogs.foxite.com/sur200
----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.

ENTIRE THREAD

grids to display in text Posted by Jake Pomperada @ 8/13/2008 1:29:07 PM
RE: grids to display in text Posted by surinder singh @ 8/13/2008 1:47:38 PM
RE: grids to display in text Posted by Yousfi Benameur @ 8/14/2008 2:26:58 AM
RE: grids to display in text Posted by surinder singh @ 8/14/2008 7:29:28 AM