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

How to use Grid

Status
Not open for further replies.

alicemong

Programmer
Mar 20, 2003
17
0
0
HK
Hi,

I am using a grid control in visual foxpro 6.0 and I set column3 with a check box. I set all the columns are enable = true and readonly = false and sparse = false. I don't know why when I click the check box in the column3, "the control is readonly" message always prompt out.

In fact, I am new to vfp and really feel frustrated about that.

Does anyone know the answers?

Any responses are welcome

Thanks you

Alice
 
alicemong

Is there a possibility your recordsource is read only?. If you have done generated a cursor from a select-sql command, then by default in VFP6, the cursor will be read only.

The ways around this are either to create the cursor, then populate it with data, or check out the FAQ's for a routine to make the read only cursor writable.



WTrueman
...if it works dont mess with it
 
HI

If you are using a cursor as your grids table, the cursor is read only. SO that may be the reason you cannot change the value. :)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Alicemong

Alternatively the check box control may be set as Readonly=.f., but the column it is contained in could be set as readonly=.t.


WTrueman
...if it works dont mess with it
 
Alice,

A couple of other possibilities ...

Is the checkbox's ControlSource a field, a variable or an expression? If it is an expression, the checkbox will always be read-only.

Is the grid's ReadOnly set to .T.? If so, that will overrride the Readonly of the column and the checkbox.

Mike


Mike Lewis
Edinburgh, Scotland
 
Hi all,

Thank for your responses. I can solve the problem now. The grid control is read only due to the cursor.

Thanks
Alice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top