Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to have grid and fields bound to same sou
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01191844
Message ID:
01191878
Vues:
10
>>>>>Is it doable at all or should I start again from scratch?
>>>>>
>>>>>Thanks a lot in advance.
>>>>
>>>>Where is WHERE clause in that CA?
>>>>If you see ALL records from table what you want to happen when something is changes in that CBOs?
>>>
>>>There are no where clause. I want the changes in the combobox to be immediatelly reflected in the grid.
>>
>>Like?
>>Filter records according the value of the combo?
>
>It looks like I can not use cSoftware, etc. as a result of select (my CA) if I want my changes reflected. I do not see a simple way out of this mess.
>>>Is it doable at all or should I start again from scratch?
>>>
>>>Thanks a lot in advance.
>>
>>Where is WHERE clause in that CA?
>>If you see ALL records from table what you want to happen when something is changes in that CBOs?
>
>There are no where clause. I want the changes in the combobox to be immediatelly reflected in the grid.
Change SelectCmd to be:
select Problems.*, 
	nvl(Software.cDescription,space(3)) as cSoftware, 
	nvl(Hardware.cDescription,space(3)) as cHardware, 
	nvl(Other.cDescription,space(3)) as cOther from problems 
	left join Software on Problems.iSoftware_Code = Software.iSoftware_Code
	left join Hardware on Problems.iHardware_Code = Hardware.iHardware_Code
	left join Other on Problems.iOther_Code = Other.iOther_Code
WHERE (?lnSoftware = 0 OR Problems.iSoftware_Code = ?lnSoftware) AND;
      (?lnHardware = 0 OR Problems.iHardware_Code = ?lnHardware) AND;
      (?lnOther    = 0 OR Problems.iOther_Code    = ?lnOther)
There where you Fill cursor:
STORE 0 TO lnSoftware, lnHardware, lnOther
CA.CursorFill()
That must bring ALL records from the table
In each ComboBox InterActiveChange put:
thisform.RefreshGrid()
RefreshGrid method:
lnSoftware = EVL(thisform.SoftwareCombo.Value, 0)
lnHardware = EVL(thisform.HardwareCombo.Value, 0)
lnOther    = EVL(thisform.OtherCombo.Value, 0)
CA.CursorRefresh()
Grid.Refresh()
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform