Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid: losing the column's DynamicBackColor
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00679377
Message ID:
00679432
Views:
19
Hi Chris,

You might want to try my Grid Highlighter, file#9798 in Downloads section.

>I lose the DynamicBackColor for some rows of a grid due to the addition of code in the WHEN clause of a combobox in the gridcolumn.
>
>In a form's INIT, i have the following to color this a grid column for a few particular grid rows:
>
>THISFORM.GrdTime.Column1.DynamicBackColor = "IIF( BETWEEN(tmptime.projfk,6,11), RGB(215,255,215), RGB(255,255,255))"
>
>
>I also need to makes these same rows readonly. In the WHEN clause of the gridcolumn's Combobox, i have the following:
>
>l_return = .t.
>SELECT tmptime
>IF BETWEEN(tmptime.projfk,6,11)
>   l_return = .f.
>ENDIF
>RETURN l_return
>
>
>This works fine with regard to being keeping the particular row cells readonly.
>
>The problem is that after i click on the combobox in column1 of the grid (cant change the value... which is good), the background turns white.
>
>I have tried placing the same "DynamicBackColor" command in the CLICK and LOSTFOCUS methods of the combo to turn back on the coloring of the row cells, without luck. Row colors remain white.
>
>If i comment out the code in the WHEN (and just RETURN), the color stays but the combo is no longer readonly.
>
>Any ideas?
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform