Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using 2 combobox in grid filtered
Message
De
15/03/2020 17:42:33
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
À
15/03/2020 09:38:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01673609
Message ID:
01673634
Vues:
52
>Hello community,
>I need to create 2 comboboxes in a grid with bindevents (I need to use Bindevents, because i dont have access to code source) , and when I select an item in combo 1, the second combobox returns the filtered records.
>both combobox's recordsourcetype is SQL and will return a cursor.
>Example:
>if combobox value 1 = 01, then in combo2 only registers starting with A should appear, for example. A01, A02 ... etc, if combobox 1 = 02 should appear in combobox 2 all records starting with B, eg. B01, B02 ... etc.
>How can I do this? does anyone have a small example of code they can share?
>thank you
>Best regards,
>Luis

Luís, maybe you could try to clarify what you're intending to do.

For instance, I still don't know why do you need to go BINDEVENTS() and what do you mean by not having the "source code". Source code for what? The combobox classes you need to instantiate?

Hello Antonio,

Thanks for your reply.
When I mention that I do not have the source code, it is because software that we sell, so I do not have access to its internal code due to being the intellectual property of the software house.
What this application allows you to do is edit the Form in drawing mode and insert a GRID where it is possible to insert code in Xbase, if you have a "Afterorwcolchange" or "LostFocus" or "Valid" bindevent referring to my number 1 combobox, I can make one filter to return only records that make sense in my 2nd combobox because the event go to trigger.
In short, after selecting a value in my 1st combobox, the values ​​returned in the second combobox must be filtered. For example, if my last 2 digits from my cost center (combo 1) refer to vehicles, they should only appear in my second combobox vehicle registration number and not for example, number of mobile phones.
I can't explain it any other way, i hope you understand what i need to do.

Best regards,
Luis
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform