Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Currentcontrol and sparse
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01621870
Message ID:
01621879
Vues:
54
>>>>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?

Strange, it gives error "The data source for this object must be a variable reference".
When I do
THIS.txt.ControlSource = THIS.Controlsource, then it works.
But
THIS.txt.ControlSource = THIS.ControlSource + "/10" then it gives the error.
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform