Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Showing Up A Dummy Combo in A Grid
Message
 
 
À
11/09/2001 03:17:05
Kiran Bajaj
Yes Bank Ltd
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00555004
Message ID:
00555010
Vues:
14
Hi!

How many cities you have in the master? If there are a lot of them it is not a good idea to use combobox for that, it will be slow. In addition, it is hard to handle combobox inside gird. Instead I would recomend to open another form with grid for city selection that will be more simple. In the DblClick code of the textbox displaying city put code:

local lcResult
Do form SelectCity with MyTableAlias.CityField to m.lcResult
if NOT (m.lcResult == "") && form was not cancelled and city was selected
replace MyTableAlias.CityField with m.lcResult in MyTableAlias
this.parent.parent.Refresh && refresh grid
endif

Then make that form with grid, Ok and Cancel buttons, store selected in grid value into the custom form property in the AfterRowColChange event of the grid, clear that property in Cancel button, close form in DblClick event of textbox in each colunm of grid and put in the UNLOAD event of the form "return thisform.SelectedCity" to return value from the form. Note that form should be modal.

Also, do not forget to pur helping label on the form to note user about DoubleClick on the city.

HTH.

>I have a grid that shows up on 4 fields
>e.g. Name, Surname,Address, City.
>
>This is link to a table which has data uploaded from an excel file.
>
>The last field city which has been populated may have incorrect data.
>The objective is to bring up a combo just beside the city column for every row. This combo will have correct location values picked up from the city master. Depending on the city the user chooses, from the drop down box, the original table should get populated with that newly chosen value.
>
>Any clues on how to do this ....
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform