Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert from grid1 to grid2
Message
De
21/04/2005 10:05:04
 
 
À
21/04/2005 09:56:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01006853
Message ID:
01006985
Vues:
20
Because you're NOT doing it as I outlined in MY reply to you (see at second example of this message). You're still getting the Type from THISFORM.GRID2.column1.text1.VALUE. Well WHICH textbox in the grid, from the whole column? As I said, your current record on the grid gives you the selected value.

>hi,
>itry as under but still if i choice e.x from mygrid2(io2),
>i see at mygrid1 io1 and io2.
>
>LPARAMETERS nColIndex
>thisform.text3.value=>? thisform.text3.value&& i see io2
>lcType = TRIM(UPPER(THISFORM.text3.VALUE))&&
>? lcType && i see io1 and io2
>SELECT 3
>*USE temp  IN 0
>LOCATE FOR TYP = lcType
>IF !FOUND()
>     APPEN BLANK
>     REPLACE TYP WITH lcType in TEMP&& replace 2 records ,it must append one record
>     GO top
>     thisform.grid1.refresh
>ELSE
>       =MESSAGEBOX("found.....")
>endif
>
>>M
>>
>>Assuming the table (MyTable) in your source grid is current, i.e. the selected table, then you can say:
>>
>>
>>LPARAMETERS nColIndex
>>
>>lcType = MyTable.TypeField
>>Select Temp  && you're STILL using specific work areas - such as Select 3, rather than the ALIAS!!!!
>>LOCATE FOR TYP = lcType
>>IF !FOUND()
>>     APPEN BLANK
>>     REPLACE TYP WITH lcType in TEMP
>>     GO top
>>     thisform.grid1.refresh
>>ELSE
>>       =MESSAGEBOX("found.....")
>>endif
>>
>>
>>Terry
>>
>>
>>>hi all,
>>>
>>>i need help to insert item (evrey time one item only) from grid2 to grid1
>>>i try via this code under.
>>>but this code get all items form grid2 and replacement to grid1
>>>
>>>but i need to replace one item after i make choice
>>>i try ==,
>>>i try set exact on,
>>>and set near off,
>>>and upper,alltrim
>>>same result ...
>>>
>>>
>>>LPARAMETERS nColIndex
>>>LOCATE FOR temp.typ=THISFORM.GRID2.column1.text1.VALUE
>>>IF !FOUND()
>>>      SELECT 3 &&mytablename is temp
>>>      APPEN BLANK
>>>      REPLACE temp.typ WITH THISFORM.GRID2.column1.text1.VALUE
>>>      GO top
>>>      thisform.grid1.refresh
>>>
>>>ELSE
>>>       =MESSAGEBOX("found.....")
>>>endif
>>>
>>>
>>>thanks.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform