Please see the following sample code:
 @ 0,0 XBROWSE oBrw OF oWnd ;
   COLUMNS 'col1', 'col2' ;
   RECORDSET oRs CELL FOOTERS
  oBrw:Col2:bClrStd := { || If( oBrw:Col2:Value > n, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE,CLR_RED } ) }
The above code sets color of the column with header 'Col2' as { CLR_BLACK, CLR_WHITE } when the cell's value > n and otherwise to { CLR_WHITE, CLR_WHITE }.
1. Please avoid using :bStrData directly in your code either to assign or to find its value. Let us leave bStrData to be used by XBrowse internally. You may find some postings in these forums using bStrData directly. That kind of usage is very obsolete and results in (a) not using XBrowse to its full power and (b) problems like this.
Instead use oCol:Value to find the cell's value.
If we allow xBrowse to construct the browse for the recordset by specifying column names XBrowse takes care of all the values properly.
In case we need set the codeblocks for a column ourselves, assign the codeblock to :bEditValue and the picture clause to :cEditPicture. XBrowse constructs internally bStrData to be something like { || Transform( Eval( oCol:bEditValue ), oCol:cEditPicture ) }.
2) Please also try to avoid using column numbers in our code. Column numbers change dynamically at runtime, when the user swaps columns. Even otherwise future mainenance of the code may become difficult when we change the order of columns or drop or add some columns in future versions.
Instead better to refer to the column object by its header name as oBrw:oCol( <cHeader> ) or oBrw:<cHeader>. Code is more readable and also easier to maintain in future.