Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving a grid's settings when changing underlying cu
Message
From
16/07/1998 15:46:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/07/1998 15:45:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00117799
Message ID:
00118288
Views:
27
>
>THISFORM.Grid1.RecordSource=THISFORM.Grid1.RecordSource
>
>PROBLEM:
>If you do this, the grid's columns, methods, and other settings disappear and need to be re-set. How can we avoid having to do this?

I've ended using a workaround: I keep a copy of the cursor's structure in an (initially empty) cursor. Then I populate it from the selection. Before any selection I blank all the records in this cursor, and when populating it I fill the blank records first, if any, and then insert the rest. This works OK if the structure of the cursor matches the selection (so I can use Scatter to [array]); if it may vary, I'd have to use Scatter Name or Scatter Memvar, which is somewhat slower. And yes, I filter out the blank records.

back to same old

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

Click here to load this message in the networking platform