DhtmlXConnector

Hi,

I have a requirement to change the cell background color based on cell value in xgrid. In dhtmlxconnector, i am using rendering behavior class where i have written code as below, but its not working

if (data.get_value(“XXXX”).equals(“4”))
{
applyColor(“yellow”, data);
}
public void applyColor(String color, DataItem data)
{
((GridDataItem)data).set_cell_style(“backgroundColor”, color);
}

For column xxxx and for the cell value =4, cell backgroud color should change to yellow.

Could you please tell me how to do these change.

Code need to be changed as

if (data.get_value(“XXXX”).equals(“4”))
{
applyColor(“XXXX”,“yellow”, data);
}

public void applyColor(String column, String color, DataItem data)
{
((GridDataItem)data).set_cell_style(column, “backgroundColor:”+color);
}