Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid's Class
Message
De
16/12/1998 12:08:38
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00167113
Message ID:
00168113
Vues:
28
>>>>>2. The table is based on the grids RecordSource property.
>>>>>From that you can solve 1.
>>>>>
>>>>>1. In the keypress event you may want to trap for the down-arrow. If pressed, select the alias driving the RecordSource of the grid and issue a skip. If EOF() = .T. add a record, otherwise, return to original record and let keypress do the default to finish the normal scroll process.
>>>>>
>>>>>
>>>>>>I'm trying to make a grid class where if user presses down arrow on last record, automatically new record should be inserted in the grid..
>>>>>>
>>>>>>I've put 'on key label ..' in when event. But :-
>>>>>>
>>>>>>1. How can I find that its on last rec ??
>>>>>>2. How can I find in which table to insert record ??
>>>>>>
>>>>>>Pls help..
>>>>
>>>>Thanks !! I'll try that...
>>>
>>>Did anyone tell you to set the grid's AllowAddNew property to .T.? I'm pretty sure that's the property that does just what you want.
>>>
>>>-Michelle
>>
>>No, I was not aware of this property, Thanks!!
>>
>>But there is one more problem, Grid has no keypress event..
>>
>>do I have to write same code in keypress events of all the columns in grid...
>>
>>Pls advise
>
>I'm guessing it doesn't have a keypress event because you're pressing on the controls, not the grid. But you don't have to write any code to do what you want. Just set that property to true and the grid takes care of everything.
>
>-Michelle


Thanks a Lot !! Its working..
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform