Hi,
We are using SmartGWT Pro 3.0 version.
We have a grid in which a field is editable (SelectItem) having 1,2 and 3 as values.
we have to display different colors for each of them using getBaseStyle()
I have given the code below:
final ListGrid alertGrid = new ListGrid()
{
@Override
protected String getBaseStyle(ListGridRecord record, int rowNum,int colNum)
{
if(getFieldName(colNum).equals(Constant.Status))
{
int status = record.getAttributeAsInt(Constant.Status);
if(status ==1)
{
return "myHighGridCell";
}
else
{
return super.getBaseStyle(record, rowNum, colNum);
}
}
else
{
return super.getBaseStyle(record, rowNum, colNum);
}
}
};
The Problem is it is displaying the content of the cell in some font style but there is no any color. how can we display the colors.
what to do for this?
Thanks in Advance
We are using SmartGWT Pro 3.0 version.
We have a grid in which a field is editable (SelectItem) having 1,2 and 3 as values.
we have to display different colors for each of them using getBaseStyle()
I have given the code below:
final ListGrid alertGrid = new ListGrid()
{
@Override
protected String getBaseStyle(ListGridRecord record, int rowNum,int colNum)
{
if(getFieldName(colNum).equals(Constant.Status))
{
int status = record.getAttributeAsInt(Constant.Status);
if(status ==1)
{
return "myHighGridCell";
}
else
{
return super.getBaseStyle(record, rowNum, colNum);
}
}
else
{
return super.getBaseStyle(record, rowNum, colNum);
}
}
};
The Problem is it is displaying the content of the cell in some font style but there is no any color. how can we display the colors.
what to do for this?
Thanks in Advance
Comment