Fred, excellent, many thanks

On Tue, Jun 19, 2012 at 5:06 PM, Fred Taylor <[email protected]> wrote:
> Don't use SetAll unless you want all the columns to have the same
> DynamicBackColor.  Set each column separately in a loop.
>
> In the Init:
>
> FOR m.xx=1 TO thisform.Grid1.ColumnCount
>  IF INLIST(m.xx,4,5,6)
>    LOOP
>  ENDIF
>  thisform.Grid1.Columns(m.xx).DynamicBackColor =
> "IIF(GOMONTH(sysdate,-12)<pemp.sickanver,RGB(255,255,255),RGB(255,128,128))"
> ENDFOR
>
> Or keep the SetAll and reset the columns you don't want to be dynamic:
>
> thisform.Grid1.SetAll("DynamicBackColor","IIF(GOMONTH(sysdate,-12)<pemp.sickanver,RGB(255,255,255),
> RGB(255,128,128))", "Column")
> FOR m.xx=1 TO thisform.Grid1.ColumnCount
>  IF INLIST(m.xx,4,5,6)
>    thisform.Grid1.Columns(m.xx).DynamicBackColor = ""
>  ENDIF
> ENDFOR
>
> Fred
>
>
> On Mon, Jun 18, 2012 at 9:29 PM, Sytze de Boer <[email protected]> wrote:
>
>> Dan, I thought you were onto it. Many thanks.
>>
>> So I changed the INIT event to:
>>
>>
>> thisform.Grid1.SetAll("DynamicBackColor","IIF(GOMONTH(sysdate,-12)<pemp.sickanver,RGB(255,255,255),
>> RGB(255,128,128))", "Column")
>>
>> thisform.grid1.column4.BackColor=RGB(128,255,128)
>>
>> But, it made no difference
>> I'll try some other options
>>
>>
>>
>> On Tue, Jun 19, 2012 at 4:04 PM, Dan Covill <[email protected]> wrote:
>> > Sytze:
>> >
>> > As I read you, you're setting the BackColor property directly for
>> > columns 4, 5, and 6, and then doing a SetAll in the Init event.  As you
>> > note, the Init code wipes out your existing BackColors.  Just set them
>> > in the Init code, right after you do the SetAll.
>> >
>> > Or Modify the SetAll to skip columns 4, 5, and 6.  Your choice.
>> >
>> > Dan Covill
>> > San Diego
>> >
>> > On 06/18/12 19:44, Sytze de Boer wrote:
>> >> Hi folk
>> >> With a grid, in the INIT event, I have set
>> >>
>> thisform.Grid1.SetAll("DynamicBackColor","IIF(GOMONTH(sysdate,-12)<pemp.sickanver,RGB(255,255,255),
>> >> RGB(255,128,128))", "Column")
>> >>
>> >> There are some 10 columns in the grid, and 3 of them should be green
>> >> So I have set the backcolor to 128,255,128 for column4, 5 and 6
>> >>
>> >> But the INIT event overrides this and the green doesn't show until
>> >> you're at the end of the file and there's some grid "left over"
>> >>
>> >> Is there a way that I can have some columns in green ?
>> >>
>> >
[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/cag1nny_721uu_gtr4p3ymhxvkaks4bdeyr1yhypjf+6wlo1...@mail.gmail.com
** 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