Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid valid does not fire
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01396480
Message ID:
01396705
Vues:
89
There is a lot going on. I do not use views or cursors for these grids, they are connected to the table, I do not zap the
recordsource and change it. So now what? I have turned off row highlighting and selectOnEntry(easier to see what
is happening). The cursor is blinking in the 1st column textbox, I enter a value at the 6th character it moves to the
next column without firing an event (if I put a wait, it fires). If I physically click on the textbox the event will fire when
the leaving the textbox. I thought gridObj.columns(1).setfocus would be like clicking on the textbox.

>It seems that your interface is complicated, so it is hard to come up with something you did not try yet. There is one common thing that can hurt grids, they don't like switching/zapping recordsources when focus is on them, e.g. it may happen inadvertently if grid is the first control in page tab order and you do something in page.activate. If it is not the case in your pageframe then, maybe, you could just try to delete the grid altogether and create new one from scratch, and then test it methodically until lostfocus will stop to react.
>
>>This has been driving crazy (short drive). Yes and No InputMask. There are 7 pages (& grids) on this pageframe
>>and all the 1st columns have different names (different data types). It looks like I will have to create an object of the
>>column I want to set focus. I put all code from the click & refresh of each grid into methods to be called on add
>>or edit of a record (should have been there anyway). This is an app from 2002, I have cleaned up a lot of code but
>>the new pages with grids I added broke everything when I compiled it. This is the only remaining issue, no valid
>>or lotfocus is triggered tabing , arrowing or pressing enter in and out of the column to validate. I have to leave so
>>I will pickup this thread in the morning, Thanks.
>>
>>>Do you mean that after you enter character #6, textbox.lostfocus event is not triggered? Do you use Inputmask?
>>>
>>>>Thanks for the response. I have used lostfocus, I tried that first, same behavior. There is no code in Interactive
>>>>or ProgrammaticChange. I have tried to trap the process and I can not see any code the takes the focus away.
>>>>I do notice that when the next column appears to get focus, It is only highlighted, no blinking cursor. I set
>>>>SelectOnEntry to true, no change. Its confusing. UPDATE: The textbox is highlighted but not selected. I reset
>>>>SelectOnEntry to false and the textbox is highlighted but no cursor blinking. I use highlighting to show the user
>>>>the record they are on. I will set if the column setfocus is not working.
>>>>
>>>>>>I have a grid on a pageframe with validating code in the valid event of the column textbox. The textbox has a
>>>>>>maxLength of 6. When entering data the cursor moves to the next column without firing the valid event. if I
>>>>>>click on the textbox and tab or enter the valid event fires correctly. I have search this forum for answers and
>>>>>>found none relating. I have tried forcing the focus using textbox::gotfocus in the textbox gotfocus event without
>>>>>>success. When the add button is clicked, I set the clm focus at the end of the click code...no difference.
>>>>>>The cursor is blinking in the textbox when data entry begins, appearing to have focus, but the valid event does
>>>>>>not fire when the cursor leaves unless I manually click on the textbox berfore hitting tab or enter.
>>>>>>Can anyone tell me what's going on? Thanks, Chuck
>>>>>
>>>>>If you do entry then focus is obviously on textbox. Maybe you have code in some other events, e.g. Interactive or ProgrammaticChange that moves focus out? I would suggest you to check when Textbox.LostFocus event gets triggered during the entry process. Btw, placing valiadation code there, i.e. using LostFocus instead of Valid would be quite consistent too.
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform