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 grid fields 1

Status
Not open for further replies.

jimsterS

Programmer
Apr 24, 2001
71
US
How do you place a checkbox in a grid field. I can't seem to make it work even using the builder.
Thanks
Jim Shepard
 
Check thread184-26487 - while the discussion is about comboboxes, the technique is the same for checkboxes.

Rick
 
I suggest you do the following ...

1. Leave the Text1 controls as it is in the Grid. If needed recreate the Grid .. 'coz that way you are sure nothing is hidden anywhere by mistake.

2. Put the name for columns in all as normal build up of grid.

3. In the init event of the said columnNumber.... put the code to initialize the control....

WITH THIS
.REMOVEOBJECT('Text1')
.ADDOBJECT('CheckBox','CheckBox')
.CURRENTCONTROL = 'CheckBox'
ENDWITH

Then put code if you need any other property to be set such as RightToLeft, Caption etc for the CheckBox.. you can reference it as
WITH THIS.CheckBox1
.Caption = "MyCaption"
ENDWITH

This ensures that nothing is hidden and everything is in front of you.

Note you set the sparse property of that column to .F.

Hope this solves your problem
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Thank you both.

When I created a table to see what happens, it did what it was supposed to. However when I tried to select one of the checkboxes displayed nothing happens. The grid is set to readonly.false

What could be the reason for not allowing me to change the state of the checkbox.

Thanks
Jim Shepard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top