Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Losing grid formatting
Message
From
05/03/2006 10:35:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/03/2006 14:04:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01099587
Message ID:
01101574
Views:
17
>Hi again,
>
>seems everybody here is convinced that it's not possible to preserve grid layout, code & the like when recreating the underlying cursor.
>
>Too hold against that here's an example that works just fine for me on VFP9 (and should work also on every older version):

Of course it's feasible, but it's also unnecessary and too much code - something that may keep you busy and introduce weird bugs and require meticulous testing. Look at what you've done here:

- created a special class for the editbox
- saved and restored recordsource for the grid and controlsource each column
- recreated the editbox's column in code (had to set no less than six properties)

Now imagine you've set few more special things in your grid. Any control that has a bit of code in it would have to be another class of its own, and you'd have to add more lines to your grid resurrection code. Any property that you change on any of the controls in columns would also have to be updated in your code.

The so-called safe select is so much simpler and the code which refills the grid's cursor is just two lines (zap grid's cursor, insert into it) - and it doesn't touch the grid at all.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform