Hang on a moment, Foxup. Are you sure you want a checkbox in the grid?
If you want the user to be able to change the value (from Yes to No or vice versa), then a checkbox is a good choice. But if you just want to display the information, then it would be better to stick with the textbox..
If that's the case, you can do this:
1. In the form designer, right-click on the grid and choose Edit. Then click on the column that will contain the Yes or No. (Check that the column is selected by looking at the drop-down list at the top of the property window.)
2. Drop a textbox into the column (either from the form controls toolbar, or the project, or the toolbox, or whatever you normally use).
3. In the property window, you should now see two textboxes within the column. Give them meaningful names, such as txtYes and txtNo.
4. Set the Value property of the textboxes to Yes and No respectively. Also, set their ReadOnly to .T. Don't worry about the ControlSource.
5. In the Init of the grid, add this code:
Code:
THIS.Column1.DynamicCurrentControl = ;
IIF(dslorder.intercon=0, "txtNo", "txtYes")
(Change Column1 to whichever column holds the textboxes.)
6. You might also need to set the grid's Sparse property to .F.
When you run the form, you should see the Yes and No in each of the rows in the relevant column. If the value in dslorder.intercon changes, you need to refresh the grid in order for the change to take effect.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy