Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox in a grid
Message
 
 
To
06/01/2014 17:30:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01591406
Message ID:
01591435
Views:
81
>>Sorry for asking this question, but how do I display a checkbox in a grid, when the underlying field is logical.
>>
>>1. make sure that your check box class is available on the form controls toolbar. In the form designer, click on the View Classes toolbar button. (This is the button that looks like a set of books.) Select the Add option and find the appropriate class library in the open files dialog.
>>2. in the drop down list at the top of the property sheet, select the grid column that will hold the check box. After clicking on the check box in the form controls toolbar, click on the grid column into which you want to drop it. If you now look at the controls listed under that column in the property sheet, you will see the checkbox that you just added.
>>3. Select the Text1 control in the column to which you just added the check box in the drop down list at the top of the property sheet
>>4. Click on the title bar of the form designer
>>5. Press the delete key
>>6. Select the column to which you just added the check box in the drop down list at the top of the property sheet and set its sparse property to .F.
>
>I still can't get this to work:
>
>if I set the controlsource of the column to the field, it doesn't update the cursor and if I set the controlsource of the checkbox to the field I get a data type mismatch when selecting the checkbox.
>
>It doesn't seem to make a difference whether I do it in the property sheet or in the init method of the checkbox.
>
>Note that the field type is logical and the cursor is READWRITE.
>
>What is the recommended way to do this?

Make sure the value of the checkbox is set to .f. and not 0.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform