Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another grid BUG
Message
De
10/04/2004 05:38:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/04/2004 14:23:39
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00893652
Message ID:
00893790
Vues:
17
>See code below. Just push the button more than 2 times and you'll see the grid won't update the contents of the table anymore.
>
>Very annoying in my case...
>
>
>
>
>X = CREATEOBJECT("Form1")
>X.SHOW(1)
>
>**************************************************
>*-- Form:         form1 (d:\program files\microsoft visual foxpro 8\x.scx)
>*-- ParentClass:  form
>*-- BaseClass:    form
>*-- Time Stamp:   04/09/04 08:17:07 PM
>*
>DEFINE CLASS form1 AS form
>
>
>	DataSession = 2
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>
>	ADD OBJECT grid1 AS grid WITH ;
>		Height = 192, ;
>		Left = 12, ;
>		Top = 12, ;
>		Width = 348, ;
>		AllowCellSelection = .F., ;
>		Name = "Grid1"
>
>
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 216, ;
>		Left = 276, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Command1", ;
>		Name = "Command1"
>
>
>	PROCEDURE Init
>		SET MULTILOCKS ON
>		CREATE CURSOR X (Day D, Desc C(100))
>		INDEX ON Day TAG day DESC
>		CURSORSETPROP("Buffering",3,"X")
>
>		THISFORM.grid1.RecordSource = "X"
>	ENDPROC
>
>
>	PROCEDURE command1.Click
>		INSERT INTO x (Day) VALUES (DATE()+RECCOUNT("X"))
>		THISFORM.Refresh
>	ENDPROC
>
>
>ENDDEFINE
Walter,
If you could use table buffering instead :
go recno()
before refresh.
Otherwise playing with height or doscroll are alternatives.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform