Si verifica dopo che la colonna specificata da ColumnIndex della riga corrente viene salvata nella cella
Descrizione
È possibile usare questo evento per applicare la formattazione condizionale a qualsiasi cella esportata nell'area di dettaglio
Sintassi
TDBGridAfterCell =
procedura (Sender: TObject; Cell:
IXLSRange; RowIndex, ColumnIndex: Integer; Column: TColumn) of object;
| Sender |
TObject. Specifica the TGridToXLS component that triggered the event |
| Cell |
IXLSRange. Rappresenta 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 |
Esempio
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;