Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help ..Grid/Browse problems
Message
 
À
04/09/1998 02:51:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00131458
Message ID:
00133144
Vues:
14
Everything is right except,
.RecordSource = spDAlias line of code.
You are defining all the columns before assing RecordSource and when you assigns RecordSource it again removes column definition. It should be like this

PROCEDURE (Form1).grdinit
WITH THISFORM
WITH .grid1
.ReadOnly = .F.
.RecordSource = spDAlias
SELE (DAlias)
.ColumnCount=0 && reset
.RecordSourceType = 1 && Alias
.ColumnCount=8
FOR ip = 1 TO 8
ColumnN.Name = XXXX
WITH .XXXX
.ControlSource = (FieldNm)
.Width = YYY
.Text1.Value = VVV
.Text1.Format = FFF
.Header1.Caption = CCC
.ColumnOrder = ip
ENDWITH
NEXT
ENDWITH
ENDWITH
ENDPROC

Bye
Jayesh




>Jayesh - Hi,
>Here's what I do.. Please tell me what I should
>
>(Form1)
>User enters a doc.Number
>Create a tmp table with relevant records from the database
>The tmp table's alias is
>Call the following method.
>When User clicks OK save the data into the database
>Loop back above
>End Form1
>
>
>PROCEDURE (Form1).grdinit
>WITH THISFORM
> WITH .grid1
> .ReadOnly = .F.
> .RecordSource = ''
> SELE (DAlias)
> .ColumnCount=0 && reset
> .RecordSourceType = 1 && Alias
> .ColumnCount=8
> FOR ip = 1 TO 8
> ColumnN.Name = XXXX
> WITH .XXXX
> .ControlSource = (FieldNm)
> .Width = YYY
> .Text1.Value = VVV
> .Text1.Format = FFF
> .Header1.Caption = CCC
> .ColumnOrder = ip
> ENDWITH
> NEXT
> .RecordSource = spDAlias
> ENDWITH
>ENDWITH
>ENDPROC
>
>
>Thanks in advance
>Bye
- Jayesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform