Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Way to update only the changed row grid color
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01416806
Message ID:
01416808
Views:
57
Usually you set the DynamicForeColor and DynamicBackColor in grid's Init. Try to make the expression optimizable (e.g. myTable.Field = padred expression)

I don't think you can speed up these expressions much - that's the price you pay for using Dynamic colors.

>I have been using the below code for some time but it seems it is quite slow, what is a way to just change the grid colors for the row the user changes, rather than have this code run on the entire grid with every row change.
>
>
>
>Thisform.Grid1.SetAll("DynamicForeColor",; 
>"IIF((<Var> == ALLTRIM(<tablename>.<fieldname>) AND <boolean1 field>) OR ;
>     (<Var> == ALLTRIM(<tablename>.<fieldname>) AND <boolean2 field>), RGB(128,64,64), RGB(255,255,255))",;
>"Column") 
>
>Thisform.Grid1.SetAll("DynamicBackColor",; 
>"IIF((<Var> == ALLTRIM(<tablename>.<fieldname>) AND <boolean1 field>) OR ;
>     (<Var> == ALLTRIM(<tablename>.<fieldname>) AND <boolean2 field>), RGB(128,64,64), RGB(255,255,255))",;
>"Column") 
>
>
>
>Should I put the color code on AfterRowColumnChange?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform