Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column ControlSource Problem
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Column ControlSource Problem
Divers
Thread ID:
00619455
Message ID:
00619455
Vues:
49
Hi

There is no indication in the documentation of how long a string can be used in the controlsource of a column. However, I do know that if I put a long expression (240 Characters) in the controlsource nothing will be displayed in the grid and no error message will be given. Should this be considered a bug?

The reason this is a problem is that I have an application where the user wants to see a list of game dates and opponents in a grid column. Since the opponents are stored as unique ID number I do a lookup to find the name to be displayed. The resulting controlsource looks as follows:
Column1.ControlSource=ThisForm.LongDate(AMSched.Date)+" "+;
ThisForm.GetTime(AMSched.Time)+;
" "+ThisForm.dCSeek(AMSched.Sport","AMActvty","ID","AMActvty.Desc")+" "+;
ThisForm.dCSeek(AMSched.Opponent1,"AMMaster","ID","AMMaster.Id1")+" vs "+;
ThisForm.dCSeek(AMSched.Opponent2,"AMMaster","ID","AMMaster.Id1")
The above code will not display anything in the grid. If I replace the code with the following everything works fine:
Column1.ControlSource=ThisForm.GetColumn1Text()

Procedure ThisForm.GetColumn1Text
   Return ThisForm.LongDate(AMSched.Date)+" "+;
      ThisForm.GetTime(AMSched.Time)+;
      " "+ThisForm.dCSeek(AMSched.Sport","AMActvty","ID","AMActvty.Desc")+" "+;
      ThisForm.dCSeek(AMSched.Opponent1,"AMMaster","ID","AMMaster.Id1")+" vs "+;
      ThisForm.dCSeek(AMSched.Opponent2,"AMMaster","ID","AMMaster.Id1")
EndProc
Simon
Simon White
dCipher Computing
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform