Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column ControlSource Problem
Message
From
13/02/2002 11:47:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00619455
Message ID:
00619557
Views:
17
Simon,
Actually in documents it states 255 for max len literal strings (Capacities). Here with 240 chars I don't think it's char limit but an error in expression. Probably you wrote it right for your method. What happens if you put the controlsource in grid init like this :
This.myColumnx.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"))]
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform