Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column ControlSource Problem
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Column ControlSource Problem
Miscellaneous
Thread ID:
00619455
Message ID:
00619455
Views:
48
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
Next
Reply
Map
View

Click here to load this message in the networking platform