Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Grid RecordSource causes class definition to be
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00080583
Message ID:
00080646
Views:
26
>I am having trouble with a particular grid on one of my forms. The RecordSourceType is 1 - Alias (specifically, a cursor generated by a SQL statement). The first time that I build the cursor and attach it to grid's RecordSource, the grid retains its parent class DblClick event for myGrid.Col1.text1.DblClick.
>
>Whenever I rebuild the cursor by re-running the SQL SELECT, however, the parent class settings for the grid are lost. The DblClick event no longer works and even the column widths and fonts are changed to be what looks like a regular BROWSE window.
>
>Can someone tell me what I might be missing?
>
>Thanks in advance.

Patrick, re-running SQL SELECT destroys the cursor and clears out Grid.RecordSource property.
If you have specific grid PEM, before re-running SQL set Grid.RecordSource=""
and after SQL reassign RecordSource and all Grid.Column(n).ControlSource.
BTW why not to use the view as a RecordSource?

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform