Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Currentcontrol and sparse
Message
From
08/07/2015 14:19:26
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01621870
Message ID:
01621878
Views:
58
>>>>This is pretty much the same what I do as well, except I do not have a textbox that is directly bound to the controlsource. I highjack the Refresh method on the control to display the data, but when executing the refresh it changes the value of the controls for all rows. I think the grid expects a textbox with a controlsource to display the data.
>>>>I will need to play around with DynamicCurrentControl then.
>>>>
>>>
>>>What your container consists of and why you can not use ControlSource? If you want to go with the Dynamic properties, then I suggest to try Fabio's solution of using DynamicFontBold (or Strike) and calling refresh method of the column. I used that idea a lot in the past, it is simple way to achieve desired functionality.
>>
>>The problem is that the value of the field ranges from 1 thru 100.
>>The control however must display a value from 1 to 10, (so dividing the value by 10).
>>So I have a container with a value property and a controlsource property, and in the refresh it displays the value in the textbox, roughly speaking like this:
>>
>>THIS.txt.Value = THIS.value / 10
>>THIS.txt.refresh()
>>
>>That works well, except the control must have the focus and Sparse must be .T.
>>
>>So the actual display value is disconnected from the real value in the table. I'm almost thinking to change it into a combobox.
>
>ControlSource property can be an expression, e.g. myTable.myColumn/10. So, why you can not use simple solution?

You are right, I should really try that, looks indeed much more simple. But why simple if it can be complicated?
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform