>Hi, I have a grid that in which I have the columncount set to 2, I have a checkbox in the second column. I've followed the manual as near as I can tell in setting this up with the checkbox inside column to and setting the currentcontrol property of the column to the checkbox. My problem is that the grid appears completely blank when I run the form. No grid lines or anything. What am I missing here?
>
>In the init event of the form I have the following:
>
>
>use (alltrim(gcUSADTDIR) + alltrim(files.path_name) + "cust") alias cust
>
>&& (I know the above table is getting opened correctly)
>
>
>thisform.custgrid.recordsourcetype=4
>thisform.custgrid.recordsource = "sele name, cust_no, .f. AS bSelected from cust order by name into cursor temp"
>thisform.custgrid.column1.controlsource="Name"
>thisform.custgrid.column2.controlsource="bSelected"
>
>
>-Rick
Rick, I would suggest you to use recordsourcetype = 1 (Alias), so the code will look like that:
sele name, cust_no, .f. AS bSelected from cust order by name into cursor temp
thisform.custgrid.recordsource = "temp"
thisform.custgrid.column1.controlsource="Name"
thisform.custgrid.column2.controlsource="bSelected"
I sent you a sample form which reproduces your situation and works :).
Note that the Custgrid.RecordSource initially is set to ""
HTH,
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison