Formatting Text by using Number Formats

Technical Articles

With TX Text Control version 26, the TableCell.Formula property has been introduced to define formulas for table cells and to display the result of such calculations as cell text. By default (empty string), the rendered text represents the unformatted value of that calculation. The result without decimal places is displayed as an integer. On the other hand, a decimal number is rendered with all its decimal places.

To display such different results with a common format, TX Text Control provides the TableCellFormat.NumberFormat property. If the TableCellFormat.TextType property is set to Number, this interface can be used to set a number format string, that is a composition of placeholders ('#' or/and '0'), separators ('.' or/and ','), percentage signs ('%') and other single characters or text.

Placeholder

Separators

Percentage

Adding Text