Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkboxes in a grid 1

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
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?
 
INFORMAT

Untested and untried, but...

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.

Chris :)
 
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
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top