In a grid (subclassed),

grid.recordsource="table1"
grid.columns[1].contorl="field1"

The grid becomes read-only.

After I changed it to:

grid.recordsource="table1"
grid.columns[1].contorl="table1.field1"

the grid can allow changes.

What could cause this?

--
iTech Consulting Co., Ltd.
Specialized in providing ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288

Re: Strange problem 3 by Anders

Anders
Wed Jan 10 05:33:59 CST 2007

I don'ät understand "grid.columns[1].contorl"
If one assigns an expression othere than "Table.field" to the ControlSource
properrty of a column , for example
grid.columns(1).ControlSource=Week(table.datefield))
it becomes readonly. This may be similar. Just 'field' is not specific
enough to work properly as a ControlSource
-Anders

"Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
news:O2IJI5HNHHA.448@TK2MSFTNGP04.phx.gbl...
> In a grid (subclassed),
>
> grid.recordsource="table1"
> grid.columns[1].contorl="field1"
>
> The grid becomes read-only.
>
> After I changed it to:
>
> grid.recordsource="table1"
> grid.columns[1].contorl="table1.field1"
>
> the grid can allow changes.
>
> What could cause this?
>
> --
> iTech Consulting Co., Ltd.
> Specialized in providing ePOS solutions
> Website: http://www.itech.com.hk (IE only)
> Tel: (852) 2325 3883 Fax: (852)2325 8288



Re: Strange problem 3 by Man-wai

Man-wai
Wed Jan 10 07:58:11 CST 2007

> I don'a"t understand "grid.columns[1].contorl"
> If one assigns an expression othere than "Table.field" to the ControlSource
> properrty of a column , for example
> grid.columns(1).ControlSource=Week(table.datefield))
> it becomes readonly. This may be similar. Just 'field' is not specific
> enough to work properly as a ControlSource

No. I didn't use an expression. it took me an hour poking around
.readonly and .enabled everywhere in the grid before I decided to try
qualifying the field names with an alias in the controlsource, and fixed
the problem. What the....

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.19.1
^ ^ 21:56:01 up 29 days 4:08 0 users load average: 1.08 1.02 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Strange problem 3 by Man-wai

Man-wai
Wed Jan 10 08:18:55 CST 2007

> No. I didn't use an expression. it took me an hour poking around
> .readonly and .enabled everywhere in the grid before I decided to try

and control.when() as well.

> qualifying the field names with an alias in the controlsource, and fixed
> the problem. What the....
>

The lesson: ALWAYS qualify your fields in grid.columns[].controlsource.
T

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.19.1
^ ^ 22:18:01 up 29 days 4:30 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Strange problem 3 by Anders

Anders
Wed Jan 10 09:01:49 CST 2007

"field" might be seen as an expression from VFP's POV when the
controlSources are set up.

-Anders

"Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
news:eSSHBJMNHHA.3424@TK2MSFTNGP02.phx.gbl...
> > No. I didn't use an expression. it took me an hour poking around
> > .readonly and .enabled everywhere in the grid before I decided to try
>
> and control.when() as well.
>
> > qualifying the field names with an alias in the controlsource, and fixed
> > the problem. What the....
> >
>
> The lesson: ALWAYS qualify your fields in grid.columns[].controlsource.
> T
>
> --
> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Ubuntu 6.10) Linux 2.6.19.1
> ^ ^ 22:18:01 up 29 days 4:30 0 users load average: 1.00 1.00 1.00
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk



Re: Strange problem 3 by Dan

Dan
Wed Jan 10 11:33:22 CST 2007

Strictly speaking, even "table.field" is an expression. <g> The difference
is that it is a fully SCOPED expression.

Dan

Anders wrote:
> "field" might be seen as an expression from VFP's POV when the
> controlSources are set up.
>
> -Anders
>
> "Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
> news:eSSHBJMNHHA.3424@TK2MSFTNGP02.phx.gbl...
>>> No. I didn't use an expression. it took me an hour poking around
>>> .readonly and .enabled everywhere in the grid before I decided to
>>> try
>>
>> and control.when() as well.
>>
>>> qualifying the field names with an alias in the controlsource, and
>>> fixed the problem. What the....
>>>
>>
>> The lesson: ALWAYS qualify your fields in
>> grid.columns[].controlsource. T
>>
>> --
>> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
>> / v \ Simplicity is Beauty! May the Force and Farce be with you!
>> /( _ )\ (Ubuntu 6.10) Linux 2.6.19.1
>> ^ ^ 22:18:01 up 29 days 4:30 0 users load average: 1.00 1.00 1.00
>> news://news.3home.net news://news.hkpcug.org
>> news://news.newsgroup.com.hk