How can you style the footer of the wwDataGrid? Right now it looks like it uses the same style as the Header. I also noticed that there is the capability to override the Footer Style, but it doesnt let you change the background color of the entire footer (the cell lines seem to be the background color of the header- and the end of the footer is the header color). Also, it would be better to be able to have one style rather than overriding the style on each grid...
It also seems that the wwLayoutGrid doesnt share the same style properties - If I set the selection and focus styles of gridstyle, they are ignored if I also have a panelstyle - the layoutgrid uses the panelstyle instead of the gridstyle - i guess this should be in a different post...
Thanks!
You can change the background and font color using the OnCustomDrawCell event. For instance...
procedure TDataGridFooterForm.dgOrdersCustomDrawCell(Sender: TObject;
CellAttributes: TwwCustomDrawCellAttributes);
begin
if CellAttributes.CellType=TwwGridCellType.gctFooterCell then
begin
CellAttributes.BackColor:= TAlphaColorRec.Yellow;
CellAttributes.fontColor:= TAlphaColorRec.Black;
end;
end;
However each cell does not paint the line area so you would have to clear this with some code. You could of course change the footer style by setting the stylelookup in formshow event and it will use the color of the style.
dgOrders.FooterControl.StyleLookup:= 'panelstyle';
Or you could even use the OnCustomDrawCell event and fill a rectangle there (bigger than the rect passed in) to deal with the portion that is not painted.