Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking current grid row
Message
From
31/10/1998 03:41:35
 
 
To
29/10/1998 04:00:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00152154
Message ID:
00153137
Views:
19
You have to use a combination of the BeforeRowColChange (BRCC) and the TextBox.When events and some variables (Form's User-defined properties)

I've noticed that there's no way of preventing the record pointers from changing unless you use a NODEFAULT in BRCC. Then, even programmatically, the record pointer stays. However, NODEFAULT in BRCC alone won't help much.

The idea is to track the record pointers. A RecNo() in BRCC (or TextBox.Valid for that purpose) gives you the pointer before it changes. The RecNo() in the When event gives you the pointer after it changes. Here, you can programmatically do a GO RECORD liOldRecPtr to revert the action.

This works well if your intention is to prevent the user from clicking or moving onto another row. Notice though, that this does not prevent the record pointer from actually changing. It just reverts the change.

You can use THISFORM.LockScreen for smoother transitions, and another variable to turn this row-freezing on/off.

E-mail me at kensoft@tm.net.my if you need a sample form.

Regards Kenneth
Kenneth.
Previous
Reply
Map
View

Click here to load this message in the networking platform