Skip to main content

TcxCustomGridTableItem.OnGetDataText Event

Enables you to specify custom text for cells. The text specified is used for displaying, sorting and grouping purposes.

Declaration

property OnGetDataText: TcxGridGetDataTextEvent read; write;

Remarks

Handle the OnGetDataText event to provide custom text for cells within a column or a Card View row. The cell whose text is to be set can be identified via the Sender and ARecordIndex parameters. The first parameter specifies the column/row where the cell is displayed while the second identifies the cell’s record index. These two parameters allow you to obtain the cell’s actual value.

To change the currently processed cell’s text, assign the desired string to the AText parameter. Note that this parameter initially holds the cell’s actual value.

Use the item’s Options.SortByDisplayText property to specify whether the display texts of its cells affect sorting.

Note

the text specified by handling the OnGetDataText event is displayed within cells and also affects sorting and grouping operations and operations associated with calculating the cell’s size, such as calculating a cell’s height and the table item’s width. If you only need to set the cell’s displayed text, handle the OnGetDisplayText event instead. The latter event also enables you to override the display text specified in the OnGetDataText event handler.

See Also