Graham

I think you could achieve what you want by adding a second control to 
the column - so that, for example, column 4 contains two (textbox) 
controls, Text1 and Text2.

Set Text2.Visible = .f. and then use DynamicCurrentControl to specify 
Text1 or Text2 as the current(active) control.

You may need to set the column sparse property to .f. in order for this 
to work properly

Disclaimer: I have not actually tried this but have done something 
similar in the past

HTH

Paul Newton

Graham Brown (CompSYS) wrote:
> Hi all
>
> I'm having a numpty moment.
>
> I've got this code to build a grid on a form. The underlying table (QTE_D)
> has a field called "QTY_LOCKED" which means the user is not allowed to
> change the qty for that one line item. I would have thought that
> .columns(4).enabled=iif(QTY_LOCKED=="Y",.f.,.t.) would have worked but it
> doesn't
>
> Is there an easier way than setting the dynamic forecolor to "grey" and
> changing the "when" event for the column?
>
> Thanks
>
> With Thisform.pageframe1.page1.grid1
>       .Top=thisform.pageframe1.page1.cssShape1.Top+3
>       .Height=300
>       .Width=thisform.pageframe1.width-50
>       .Visible=.F.
>       .Left=5
>       .GridLines=0
>       .RecordMark=.F.
>       .DeleteMark=0
>       .RecordSourceType=1
>       .RecordSource="qte_d"
>       .ColumnCount=7
>
>       .Columns(1).Name="column1"
>       .Columns(1).ControlSource="qte_d.qd_desc1"
>       .Columns(1).Width=250
>       .Columns(1).HEADER1.Caption="Description"
>
>       .Columns(2).Name="column2"
>       .Columns(2).ControlSource="qte_d.qd_LENGTH"
>       .Columns(2).Width=70
>       .Columns(2).HEADER1.Caption="Length"
>       .columns(2).alignment=1
>       .columns(2).inputmask="999"
>
>       .Columns(3).Name="column3"
>       .Columns(3).ControlSource="qte_d.qd_width"
>       .Columns(3).Width=70
>       .Columns(3).HEADER1.Caption="Width"
>       .columns(3).alignment=1
>       .columns(3).inputmask="999"
>
>       .Columns(4).Name="column4"
>       .Columns(4).ControlSource="qte_d.qd_qty"
>       .Columns(4).Width=70
>       .Columns(4).HEADER1.Caption="Qty"
>       .columns(4).alignment=1
>
>       .Columns(5).Name="column5"
>       .Columns(5).ControlSource="qte_d.qd_itemprice"
>       .Columns(5).Width=120
>       .Columns(5).HEADER1.Caption="Each"
>       .columns(5).alignment=1
>
>       .Columns(6).Name="column6"
>       .Columns(6).ControlSource="qte_d.qd_disc"
>       .Columns(6).Width=70
>       .Columns(6).HEADER1.Caption="Discount"
>       .columns(6).alignment=1
>
>       .Columns(7).Name="column7"
>       .Columns(7).ControlSource="qte_d.qd_totalprice"
>       .Columns(7).Width=120
>       .Columns(7).HEADER1.Caption="Total"
>       .columns(7).alignment=1
>       .highlightstyle=2
>       .Refresh()
> Endwith
>
>
> Graham Brown
> CompSYS Software Solutions
> T:0845 202 8480
> F:0845 202 8480 / 0845 009 4480
> M:07973 988939
> E:[EMAIL PROTECTED]
>
> BNI Member. The Business Referral Organisation
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to