RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDSTableProducer.DoFormatCell Method

Generates an OnFormatCell event.

Pascal
procedure DoFormatCell(CellRow: Integer; CellColumn: Integer; var BgColor: THTMLBgColor; var Align: THTMLAlign; var VAlign: THTMLVAlign; var CustomAttrs: string; var CellData: string); dynamic;
C++
__fastcall DoFormatCell(int CellRow, int CellColumn, THTMLBgColor BgColor, THTMLAlign Align, THTMLVAlign VAlign, AnsiString CustomAttrs, AnsiString CellData);

Applications can't call this protected method. It is called internally by the Content method to allow the OnFormatCell event handler to customize the contents or display attributes of any cell in the HTML table. CellRow and CellColumn indicate the cell about to be rendered as HTML, where CellRow for the table header is 0, and CellColumn for the first column is 0. BgColor, Align, VAlign, and CustomAttrs are the display attributes that can be changed. CellData is the text that goes in the cell. 

Descendants of TDSTableProducer can override DoFormatCell to make additional changes to the cells as they are rendered or to block the OnFormatCell event. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!