Fabio,
>AND NOT HARD CODED !!!
Sorry but your posted code is extremely hard coded!
Only 3 statuses allowed because of the array, hard coded color values put into the array, constrained to status values >= 'A', error causing if status D is added to the system at a later point.
Cetin' and John's method based approaches are far more robust.
Not hard coded means that it's entirely driven by data stored in a place and used in a fashion that doesn't require recompilation for the change to appear within the application.
>another way ( rigid ( ABCDE... only ) but faster.
>
>* grid Init
>this.addproperty("statusColor[3]")
>this.statusColor[1] = 0xFF0000
>this.statusColor[2] = 0x00FF00
>this.statusColor[3] = 0x0000FF
>
>this.Setall('DynamicBackColor';
>,'this.statusColor[ASC(manifest.status)-64]')
>
>
>extreme rigid but faster:
>
>this.Setall('DynamicBackColor';
>,'BITLSHIFT(255,8*(ASC(manifest.status)-65])')
>