Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Reconstruction
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Grid Reconstruction
Miscellaneous
Thread ID:
00815341
Message ID:
00815341
Views:
46
I've read all there is to read about packing and how it forces a grid reconstruction. I don't want to use "set deleted". This, notwithstanding, if I create a custom grid, in this case creating a click event in text1, then I "pack" which forces the grid to reconstruct, if I call the .grid.init a second time:

1 FOR EACH oColumn IN This.Columns
2 FOR EACH oControl IN oColumn.Controls
3 IF UPPER(oControl.BaseClass) = "TEXTBOX"
4 cTxtbxName = oControl.Name
5 oColumn.RemoveObject(cTxtbxName)
6 oColumn.NewObject(cTxtbxName, "txtnew", ;
"C:\MYDOCS\DBFOXPRO8\GRIDTEXT.PRG")
7 ocolumn.visible=.t.

i get a "member with this name already exists" (line 6) error. Unfortunately, my knowledge of oop is not that great - I assume i need code to release the object when it was first called in order to create it again but I don't know what it is. Thank you for the help again.

Joe Philips
Next
Reply
Map
View

Click here to load this message in the networking platform