Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Click Event From Grid Header
Message
 
 
To
10/11/1998 15:20:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00156309
Message ID:
00156392
Views:
36
Scott,

>but when I run it from the grid header, it runs the first time and the second time I click the header It's as though there is no code at all.

That's because there isn't any code to run.

The event of recreating the cursor out from under the grid, causes the grid to self destruct, and then rebuild itself. When it rebuilds it uses the default column, header and textbox classes. I don't use grids in this fashion but I think the solution is to set the RecordSource = "" before you create the new cursor and then restore RecordSource.

I think you should look at using temp indexes on a view. This way the grid will maintain itself.

You can also just flush the grid yourself and rebuild it, substituting your own Header class, Header subclasses can only be defined in a .PRG.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform