Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie - can't edit recs in grid (The record is read-onl
Message
 
 
To
26/10/2006 12:56:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01164636
Message ID:
01164793
Views:
12
>All the supposed shortcuts, using this.whatever, cause errors. So I added ThisForm.PageFrame1.Page1.Details.SetFocus to my form's Activate method. That does cause the first cell in the grid to become active as soon as the form loads. But the record is still read-only... But I will leave this in place, as I do want the grid to be active upn entry...
>
>I noticed you used SetFocus() - I did not add the parentheses since they were not needed with Refresh. But just so I learn something, is it legit to follow a method with parentheses?
>
>So why does adding a field from the grid's ControlSource to the form (not the grid) make the grid no longer read-only? The $64,000 question :>)
>
>Thanks for all your time and patience Naomi!

Mike,

I can feel your pain. I had so many frustrations when the simple things that are supposed to work don't function properly for unknown reason. But since we have this nice forum I at least can share my problems and eventually get them resolved.

If you're in charge of software, I would suggest you to get the latest version of VFP (VFP9 SP1), so you can start with the latest and the best, which has lesser bugs than previous versions may have.

Now, I was suggesting to put SetFocus in page Activate method. Open code for the form, try to find Page1.Activate method (or you can get there from the properties sheet). Put there
=messagebox(iif(this.grid1.ReadOnly,"My grid is read-only - no wonder","Something else is amiss"))
this.grid1.SetFocus()

Let me know the result of this messagebox.

Basically, debugging this problem may be very tricky at first. Sometimes I use debug, sometimes I use wait windows and messageboxes when I'm investigating the problem.

I prefer to put () for the methods. The difference between methods and events sometimes is subtle... I consider SetFocus(), refresh() as methods rather than events.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform