Inträffar efter att kolumnen som anges av ColumnIndex i aktuell rad har sparats i cellen
Beskrivning
Du kan använda den här händelsen för att tillämpa villkorsstyrd formatering på vilken exporterad cell som helst i detaljområdet
Syntax
TDBGridAfterCell =
procedure (Sender: TObject; Cell:
IXLSRange; RowIndex, ColumnIndex: Integer; Column: TColumn) of object;
| Sender |
TObject. Anger the TGridToXLS component that triggered the event |
| Cell |
IXLSRange. Representerar the cell which is exported |
| RowIndex |
Integer. The index of the current row |
| ColumnIndex |
Integer. The index of the column |
| Column |
TColumn. An object that represents the column |
Exempel
This example sets the interior color for odd columns to silver
procedure TForm1.GridToXLS1AfterCell(Sender: TObject;
Cell: IXLSRange; RowIndex, ColumnIndex: Integer; Column: TColumn);
begin
if Odd(ColumnIndex + 1) then Cell.Interior.Color := ColorToRGB(clSilver);
end;