Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating edits in a grid
Message
From
01/11/2007 15:40:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Validating edits in a grid
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01265853
Message ID:
01265853
Views:
53
Hi All,

I have a grid on a form, where the user clicks on a 're-name' button, and the code sets focus to the grid in the row that they were on when they clicked the button. If they try to move to another row, either by arrows or by clicking in the new row with the mouse, I have code in the valid and afterrowcolumnchange to put the grid back to readonly, so they can not edit a row that they were not on, when they pressed the 're-name' button. There are some records that they are not allowed to re-name, and the 're-name' button is grayed out when they are on these records. I need to check the title that they have typed in, but I can not seem to get the code into the correct method. The code is a function that sends back true or false. I have it in the grid.valid, grid.aftercolumnchange, grid.keypress (for when they hit {enter}), in the textbox with in the grid, I have it in textbox.keypress (for when they hit {enter}), textbox.lostfocus, and textbox.valid.

We want the grid to act like windows explorer. When you hit the 're-name' button, it opens the file name already selected into edit mode. if you move off of that file, edit mode is closed. And the new name is checked against what is already out there, if matchs, error is detected, messagebox comes up and you do not get out of that edit window.

Any Ideas?

Thanks in Advance,
Beth
Next
Reply
Map
View

Click here to load this message in the networking platform