How to set cellattributes depending on a previous row field value?
Goal is to achieve a layout as shown here:
You could suppress the data painting using code like the following.
procedure TDataGridExportForm.wwDataGrid1CustomDrawCell(Sender: TObject;
var beforeState: string;
if (CellAttributes.DataRow>0) and (CellAttributes.column<>nil) and (CellAttributes.column.FieldName='State') then
beforeState:= (Sender as TwwDataGrid).GetValueByRecord('State', CellAttributes.DataRow-1, false).AsString;
if beforeState=CellAttributes.GetValue('State').AsString then
I don't think there is a simple way to suppress the lines though in FirePower. I think we would have to expand the current event to include lines.
You might also consider using the TwwTreeView as it can display a grid after you expand giving you a similar effect.
Please sign in to leave a comment.