The following example shows the basic use of the beforeCellPaint and onCellPaint events:

function column1_beforeCellPaint(bSelectedRow)

   if this.value < 0

      if.not.bSelectedRow

         // Change grid cell color to red on white for a negative number.

         this.colorNormal = "red/white"

      endif

   endif

return

 

 function column1_onCellPaint(bSelectedRow)

     this.colorNormal = "" // reset to grid default colors

  return