Customize cell rendering

In this section custom cell rendering is demonstrated using the CellConfigurationExample. All the cells in with the value 'AAA' are rendered with a red background.

Step 1: add custom cell labels to the cells which you want to render differently

    CellOverrideLabelAccumulator cellLabelAccumulator = new CellOverrideLabelAccumulator(gridLayer.getBodyDataProvider());
    cellLabelAccumulator.registerOverride("AAA", 2, CELL_LABEL);

    // Register label accumulator with the data layer
    bodyDataLayer.setConfigLabelAccumulator(cellLabelAccumulator);

Step 2: Register cell attributes in the IConfigRegistry for the labels in step 1

        Style style = new Style();
        // You can set other attributes here
        style.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.COLOR_RED);

        configRegistry.registerConfigAttribute(
                 CellConfigAttributes.CELL_STYLE,    // attribute to apply
                 style,                              // value of the attribute
                 DisplayMode.NORMAL,    // apply during normal rendering i.e not during selection or edit
                 CELL_LABEL);                   // apply the above for all cells with this label