Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic Grid Question
Message
From
22/03/2004 06:07:17
 
 
To
18/03/2004 19:03:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00887734
Message ID:
00888445
Views:
22
Barb

Hmmmm ... Not sure if this will help but may I suggest:

THISFORMSET.form1.grid1.column1.controlsource = "tempordersdetail.clinecode", etc., i.e. setting the controlsource of the column.

Also, may I suggest you use the With ... EndWith construct as: 1) it makes the code much more readable and 2) VFP doesn't have to evaluate each object down the hierarchy, each time.

e.g.

With THISFORMSET.form1.grid1
.readonly = .F.
.recordsourcetype = 1
.recordsource = "tempordersdetail"
...
EndWith

HTH

Terry

P.S. By the way, for MY info, what is the "e" in your refresh method - ".Form1.refresh(e)" - about? I've not come across such before.





>I have a formset created, with a second form that only displays a grid,
>The data in the grid is to be added by the user and the table and grid are created programatically.
>
>Everything displays properly, except the grid will not accept input
>
>HELP!
>
>CREATE TABLE tempordersdetail ;
> (clinecode c(5), ;
> corderid c(20), ;
> cpartno c(30), ;
> dcost n(8,2), ;
> dqob n(8,1), ;
> dqoo n(8,1), ;
> ldeleted l)
> THISFORMSET.form1.grid1.readonly = .F.
> THISFORMSET.form1.grid1.recordsourcetype = 1
> THISFORMSET.Form1.grid1.recordsource = "tempordersdetail"
> THISFORMSET.form1.grid1.allowaddnew = .T.
> THISFORMSET.Form1.grid1.columncount = 3
> THISFORMSET.form1.grid1.column1.header1.caption = "Line Code"
> THISFORMSET.form1.grid1.column2.header1.caption = "Partnumber"
> THISFORMSET.form1.grid1.column3.header1.caption = "Quantity"
> &&THISFORMSET.form1.grid1.column1.text1.controlsource = "tempordersdetail.clinecode"
> &&THISFORMSET.form1.grid1.column2.text1.controlsource = "tempordersdetail.cpartno"
> &&THISFORMSET.form1.grid1.column3.text1.controlsource = "tempordersdetail.dqoo"
> APPEND BLANK
> THISFORMSET.Form1.grid1.column1.text1.setfocus
> THISFORMSET.Form1.refresh(e)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform