Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Reconstruction
Message
From
31/07/2003 09:42:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00815341
Message ID:
00815357
Views:
14
>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

Joe,
It's very simple :

Grid.Recordsource = ''
*pack
Grid.Recordsource = 'cursorname'

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
Previous
Reply
Map
View

Click here to load this message in the networking platform