Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enabled / disabled checkbox in a grid with only 1 contr
Message
 
 
À
28/03/2011 12:20:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01505221
Message ID:
01505233
Vues:
57
>>Hi everybody,
>>
>>I'm wondering if there is a simple solution of using just one control and yet controlling checkbox enabled status in a grid.
>>
>>In the first column of the grid I have a combobox. Depending on the selected value, I want to adjust checkboxes in my grid to be enabled /disabled for this record. However, when I set them in the combo's valid event, it seems like all checkboxes get re-set, not the current row only.
>>
>>Thanks a lot in advance for ideas.
>
>(1) add a field (logical) to the rowsource of the grid
>
>(2) the field contains whether the checkbox should be readonly or not
>
>(3) you'll need two checkboxes, one readonly the other not
>
>(4) in the combobox.valid update the field of (1)
>
>(5) the checkbox column should have a DynamicCurrentControl based on the value of the field in (1)
>You better add a DynamicBackColor showing whether the checkbox is enabled

Can you suggest a quick code to add the same checkboxes as I aleady have (just disabled) to these columns?

My enabled checkboxes are named chkEn and I want to add chkDis to the grid.

Ok, disregard - added them using Grid Builder. The only problem is that for some reason they all get named in the upper case, so now I'm renaming them to the proper casing.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform