Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00535153
Message ID:
00535376
Vues:
16
>Hi Nadya,
>
>If I understand you correctly you have placed two combobox controls in one grid column and are deleting the one you dont want to use when the grid is initialized.

No, I placed one combo and one textbox, where textbox class is my own class. I removed the original textbox. I've done it in design-time of this grid.

>Are you then specifying the combobox class you DO want to use as the 'current control' for the grid column?

Yes, in run-time I set currentcontrol to either combo or textbox depending on form's property ProcType.

>It might be a little late to be doing this sort of thing at the time the grid is initialized.
>
Agree. I tried to place some code in combo/textbox Init (in other words, return .f. from init to prevent it from instantiating), but lately decided to use grid Init instead. Besides, this part working.

>As far as the records jumping around on the grid: Is the value of the combox or another field on the grid contained on an index used to sort the table that is the grids data source?

Yes, and this is my biggest problem. If the user changes any of the fields, which is part of the index expression, the record jumps to another location. Next/Prev buttons also would place to another location. I want to keep user at the same location, as he/she was.

Another problem is, that if the user empties the field, we have to substitute it with NULL (our Update engine requirement), therefore this record jumps to the top of the file. I don't see a solution to this problem except for changing index expression, which I don't think, we want to change...
>Best regards,
>
>Todd
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform