NOTE: This grid renderer is not as performant as the others and it's use is not recommended if you care about performance. The reasons for the wanting performance are unclear, possibly having to do with the way Chrome optimizes access to the column objects?
Paints all the cells of a grid, one row at a time.
First, a background rect is drawn using the grid background color.
Then, if there are any rows with their own background color that differs from the grid background color, these are consolidated and the consolidated groups of row backgrounds are all drawn before iterating through cells.
try...catch surrounds each cell paint in case a cell renderer throws an error.
The error message is error-logged to console AND displayed in cell.
Render the grid.
Remarks
NOTE: This grid renderer is not as performant as the others and it's use is not recommended if you care about performance. The reasons for the wanting performance are unclear, possibly having to do with the way Chrome optimizes access to the column objects?
Paints all the cells of a grid, one row at a time.
First, a background rect is drawn using the grid background color.
Then, if there are any rows with their own background color that differs from the grid background color, these are consolidated and the consolidated groups of row backgrounds are all drawn before iterating through cells.
try...catch
surrounds each cell paint in case a cell renderer throws an error. The error message is error-logged to console AND displayed in cell.