Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locator Grid Class
Message
 
 
À
23/11/2004 12:01:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00963866
Message ID:
00964219
Vues:
7
Cetin,

That's done it

Many thanks again


>I think I understand better now:
>
>
* A button click calling another form and returning an Id
>do form myOtherForm to m.lnId && ie: This form inserts a new record and returns a unique id
>
>with this.Parent.Locatorgrid1
> .Reload() && Requery for data changed
> select (.RecordSource)
> locate for myIdField = m.lnId
> .SetFocus() && Does AfterRowColChange positionings
>endwith
>
>Did I understand right now? Use locatorgrid's reload() to requery, do not go through init.
>
>PS: Instead of another form I generally use the same form for add/edits (have a buttongroup takes care of Add,Edit,Save,Revert,Delete).
>Cetin
>
>>Cetin,
>>
>>I call another form from my locator form, then return to my locator form &
>>run the init event of that form again to requery the data (which may have changed). The current record is always the 1st record?
>>
>>If I close the form, then recall it the correct record is selected.
>>
>>Can you help?
>>
>>
>>
>>
>>>>Hi Cetin,
>>>>
>>>>I'm using the grid locator class, I want to call the form & position on a particular record on the grid.
>>>>
>>>>HTMS
>>>>
>>>>Robin
>>>
>>>Hi Robin,
>>>I'm not sure I exactly understood. Do you mean you wan to call a form with a locatorgrid in it and when it shows up you want to be on a particular record? If so simply issue a locate with its recordsource selected. Below is a very basic sample:
>>>
>>>-A form with a locatorgrid on it (default name LocatorGrid1)
>>>-cSQL is set to "* from customer"
>>>
>>>*Form init
>>>lparameters tcLocateExpression
>>>select (this.LocatorGrid1.RecordSource)
>>>locate for &tcLocateExpression
>>>
>>>Warning: No checking if tcLocateExpression is of char type etc.
>>>
>>>Sample call:
>>>do form myForm with "upper(contact) = 'B'"
>>>
>>>Cetin
Rob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform