Docs HotXLS

AfterRow événement

Occurs after the specified by RowIndex record is saved into the Worksheet

Description

Vous pouvez utiliser cet événement pour appliquer une mise en forme conditionnelle à la ligne entière de la zone de détail

Syntaxe

TDBGridAfterRow = procedure (Sender: TObject; Range: IXLSRange; RowIndex: Integer) of object;
Sender TObject. Specifies the TGridToXLS component that triggered the event
Range IXLSRange. Represents a range which contains the exported row
RowIndex Integer. The index of the row which is exported

Exemple

This example sets the interior color for odd rows to aqua

procedure TForm1.GridToXLS1AfterRow(Sender: TObject;
  Range: IXLSRange; RowIndex: Integer);
begin
  if Odd(RowIndex) then Range.Interior.Color := ColorToRGB(clAqua);
end;