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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CheckBox in Grid 1

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
Hi again,

I have a grid with a checkbox that looks fine, as far as the correct data being displayed. The data come fromm an SQL Cursor.

The check box however does not respond to a mouse click. I would expect the check to appear/disappear as appropriate, like it does on a standard form.

Thanks.

 
Is the cursor readonly?
Add READWRITE clause to the SQL query.

Did you add the checkbox programmatically?
Set Visible = .t., even though it is drawn in the grid. That's another grid quirk, but any control is not usable, unless visible is .T. and for anything you add programmatically visible defaults to .F.

Bye, Olaf.

 
Is it possible that the column is read-only? If so, that would explain what you are seeing.

Or, is the grid populated from a cursor which is read-only? You refer to a "SQL cursor". If the cursor was created by a SQL SELECT statement, and if you did not include the READWRITE clause, then the cursor will be read-only, so you will get the same effect.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
The SQL statement includes READWRITE. The control was added with the Form Designer. The columns ReadOnly property is set to .F. So that is not my problem.

When I click on the CheckBox the rest of the row is highlighted, (but not he column with the Check Box). The other columns are set to read only. This happens whether I click on the CheckBox or any other place in the column.

It appears as if I have to set it to AlwaysOnTop, but that feature is not available.

Sam
 
Check the various grid properties with Highlight in their name. Your grid may be set up to be display-only.

Tamar
 
Thank you Tamar,

Right on.

The property AllowCellSelection was set to .F. Changin it to .T. did the trick.

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top