Gets or sets the format string used to convert data to text to display.
The format string used to convert data to text to display.
The provided string is used as an argument to String.Format function, to convert data provided as a second argument. The data are represented by {0} in the format string.
This sample shows the generated code to create text cell displaying totals with currency information, see the format string used: [Visual Basic]
Dim TextCell1 As New Resco.Controls.AdvancedTree.TextCell
TextCell1.Alignment = Resco.Controls.AdvancedTree.Alignment.TopRight
TextCell1.Bounds = New System.Drawing.Rectangle(0, 16, -1, 16)
TextCell1.CellSource.ColumnName = "Total"
' We display the currency information with the constant text "Total: "
TextCell1.FormatString = "Total: {0:c}";
TextCell1.TextFont = New System.Drawing.Font(_
"Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold)
NodeTemplate1.CellTemplates.Add(TextCell1)
[C#]
Resco.Controls.AdvancedTree.TextCell textCell1 = new Resco.Controls.AdvancedTree.TextCell();
textCell1.Alignment = Resco.Controls.AdvancedTree.Alignment.TopRight;
textCell1.Bounds = new System.Drawing.Rectangle(0, 16, -1, 16);
textCell1.CellSource.ColumnName = "Total";
// We display the currency information with the constant text "Total: "
textCell1.FormatString = "Total: {0:c}";
textCell1.TextFont = new System.Drawing.Font(
"Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold);
nodeTemplate1.CellTemplates.Add(textCell1);
TextCell Class | Resco.Controls.AdvancedTree Namespace | Format