Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlighting Grid Rows
Message
 
To
06/05/2009 11:10:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01398121
Message ID:
01398169
Views:
49
>>I am now trying to get the highlight to work for only 2 of the columns, instead of all of them.... Naomi is giving me some hints at the moment... do you have any?
>
>I have many:)
>
>1) Prefer custom methods when you need complex conditions. ie:
>
>
this.SetAll( "DynamicBackColor", "( thisform.MyCustomReorderColor() )" )
>
>Then in custom code you can freely test your condtions and return a color. ie:
>
>
>do case
> case reorder.quan_ship = 0
>     return rgb(255,255,255)
>...
> otherwise
>     return rgb(255,255,255)
>endcase
>
>
>2) To apply it to a particular column do not use setall but explicit columns (typically in form.init)
>
* apply to 2nd and 3rd columns
>store "( thisform.MyCustomReorderColor() )" to ;
>  this.myGrid.Columns( 2 ).DynamicBackColor, ; 
>  this.myGrid.Columns( 3 ).DynamicBackColor
>
>3) To apply a dynamic expression that needs the controlsource of column do not use setall but loop columns (typically in form.init)
>
for ix = 1 to this.myGrid.ColumnCount
>  this.myGrid.Columns( m.ix ).DynamicBackColor = ;
>      "( thisform.MyCustomReorderColor("+this.myGrid.Columns( m.ix ).ControlSource+") )"
>endfor
>
>4) ...
>
>Cetin

Thanks a bunch! I copied this for future reference!
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform