Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PROBLEM: Grid changes my currently selected area/alias
Message
From
17/03/2006 09:54:01
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01105063
Message ID:
01105293
Views:
40
This message has been marked as the solution to the initial question of the thread.
Thanks to everyone for helping me out. I think I can handle it now by using a combination of the following proposed solutions from everyone.

1. A possible work around. In the when event of the grid, save the alias. In the valid event, put the saved alias back.

2. Use a third party grid control which doesn't change the current alias.

3. You might try saving the current selected alias in each form's deactivate event; on the activate event reset the selected alias. If these can be fired independent of the selection of forms (like due to a timer event), then I would manage each form's alias at the _screen level via a custom property and then each code would have to get the alias from this custom property and set as current before processing.

4. write every method like this...

LOCAL loPushPopAlias
loPushPopAlias = CreateObject("cusPushPopAlias")
*select new alias
*do some stuff.
*select another alias
*do somestuff.
*call a UDF or method - which will also remember aliases

5. You can't prevent that. Write your code so that it's not dependant on current workarea or selects the alias first.

6. Move processing code in its own data session. I'm not sure if it could be a solution for you, but I don't see a better one unless make sure that grid doesn't have focus when you're doing your processing...

Thanks again everyone.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform