I have checkboxes in several columns of my grid. This grid is linked to a table. If the value that is linked to a checkbox has a null value, then that checkbox has to be disabled. Can someone help me with this isue?
Checkboxes support a value of 2 - Mixed-value, so you could use the .NULL. value to set the checkbox value, and also the .Tag property of the checkbox to be 2.
This will visually indicate to the user a .NULL. value
In the .Valid event set the property back to to 2 if the .Tag value is 2, if anyone clicks or tabs through the control.
INFORMAT, you can use the DynamicCurrentControl of the grid column and 2 checkboxes in the column. Let assume Check1 is usual checkbox and Check1Dis is the same checkbox but with 'Enabled=.F.'. DynamicCurrentControl = "iif(IsNull(RecordSource.CheckBoxField),'Check1Dis','Check1')"
This way VFP grid will show disabled control for records with .NULL. value in that field.
Hope this helps.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.