NativeExcel suite v2.x

AfterDetailRow event

Occurs after the specified by RowIndex record is saved into the Excel.

Description

You can use this event to apply conditional formatting to the whole row in the detail area.

Syntax

TDBGridAfterDetailRow = procedure (Sender: TObject; Range: IXLSRange; RowIndex: integer) of object;
SenderTObject. Specifies the TDBGrid2Excel component that triggered the event.
RangeIXLSRange. Represents a range which contains the exported row .
RowIndexInteger. The index of the row which is exported.

Example

This example sets the interior color for odd rows to aqua.
procedure TForm1.DBGrid2Excel1AfterDetailRow(Sender: TObject;
  Range: IXLSRange; RowIndex: Integer);
begin
  if Odd(RowIndex) then Range.Interior.Color := ColorToRGB(clAqua);
end;
Copyright © NikaSoft 2004-2012