Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vertical scrollbar behavior in a master/child grid
Message
De
04/06/2002 09:28:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
04/06/2002 09:20:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00664415
Message ID:
00664420
Vues:
22
Standard VFP behavior - VFP includes non-visible (filtered-out) records.

If you use a parameterized view for the child, you will:

1) Avoid this problem,

2) Have better performance in general. Especially important for large tables.

HTH, Hilmar.

>Hi all,
>Why does the vertical scrollbar of the grid containing child table behave as such: the movable square is always at the bottom even though there are still records that are not displayed.
>
>PUBLIC oform1
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>**************************************************
>*-- ParentClass:  form
>*-- BaseClass:    form
>*-- Time Stamp:   06/04/02 09:17:02 AM
>*
>DEFINE CLASS form1 AS form
>	Top = 0
>	Left = 0
>	Height = 238
>	Width = 512
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>	ADD OBJECT grid1 AS grid WITH ;
>		Height = 84, ;
>		Left = 12, ;
>		Top = 12, ;
>		Width = 480, ;
>		Name = "Grid1"
>	ADD OBJECT grid2 AS grid WITH ;
>		Height = 96, ;
>		Left = 12, ;
>		Top = 120, ;
>		Width = 481, ;
>		Name = "Grid2"
>	PROCEDURE Init
>		create cursor mst (f1 i)
>		insert into mst values (1)
>		insert into mst values (2)
>		insert into mst values (3)
>
>		create cursor child (f1 i, f2 c(1))
>		index on f1 to child
>		insert into child values (1,'A')
>		insert into child values (1,'B')
>		insert into child values (1,'C')
>		insert into child values (1,'D')
>		insert into child values (1,'E')
>		insert into child values (1,'F')
>		insert into child values (1,'G')
>		insert into child values (1,'H')
>		insert into child values (1,'I')
>		insert into child values (1,'J')
>		insert into child values (1,'K')
>		insert into child values (2,'L')
>		insert into child values (2,'M')
>		select mst
>		go top
>		set relation to f1 into child
>		thisform.grid1.RecordSource = 'mst'
>		thisform.grid1.RecordSourceType = 1
>		thisform.grid2.RecordSource = 'child'
>		thisform.grid2.RecordSourceType = 1
>	ENDPROC
>ENDDEFINE
>*
>*-- EndDefine: form1
>**************************************************
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform