FlexGrid with Custom CellFactory

This grid uses a custom cellFactory to customize cells for display.

Using a custom cellFactory class is slightly more complex than using an itemFormatter or the formatItem event, but it can be more efficient because it allows you to bypass the default cell content generation and recycle custom cells.

The CustomCellFactory class used in this example uses the base class to position the cell elements without changing their content, which is updated only when necessary. Because the grid reorders and recycles cells, this results in improved rendering performance.

Compare the performance of each rendering mode by selecting an option below and scrolling the grid with the mouse or keyboard: