Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another grid BUG
Message
From
09/04/2004 14:51:45
 
 
To
09/04/2004 14:23:39
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00893652
Message ID:
00893670
Views:
28

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...


Hi Walter,
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.

	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) DEFAULT STR(RECCOUNT()))
		INDEX ON Day TAG day DESC
		CURSORSETPROP("Buffering",3,"X")
* WA1
		SET ORDER TO 
* WA2
*		CURSORSETPROP("Buffering",1,"X")
		THISFORM.grid1.RecordSource = "X"
	ENDPROC


	PROCEDURE command1.Click
		INSERT INTO x (Day) VALUES (DATE()+RECCOUNT())
* WA3
*		TABLEUPDATE()
		THISFORM.Refresh
	ENDPROC


ENDDEFINE 
ACTIVATE one of the 3 WA line code, and the bug is skipped.

Cause:
Grid use index for read the records, but it ignore index buffer.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform