See Also

TextBox Class  | TextBox Members  | OutputFormat Strings

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

OutputFormat Property

Gets or sets the mask string used to format the Value property before placing it in the Text property.

[Visual Basic]
Public Property OutputFormat As String
[C#]
public string OutputFormat {get; set;}

Remarks

The formatting mask can only be used to format numbers and dates.  There is no support for formatting alphanumeric strings.

Setting the OutputFormat in the Format event of a control's section does not catch the first record. The reason for this behaviour is that the database values are applied to the the control BEFORE the Format event. If you change the OutputFormat in the Format event, set Control.Value=Control.Value so that the OutputFormat gets reapplied.

The OutputFormat property of the TextBox control includes four sections delimited by a semicolon.  Each section contains the format specifications for a different type of number:

Example

[C#] 

private void Detail_Format(object sender, System.EventArgs eArgs) 

    this.txtShippedDate.OutputFormat = "MMMM"; 
    this.txtShippedDate.Value = this.txtShippedDate.Value; 
}

[Visual Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    Me.txtShippedDate.OutputFormat = "MMMM"
    Me.txtShippedDate.Value = Me.txtShippedDate.Value
End Sub

See Also

TextBox Class  | TextBox Members  | OutputFormat Strings

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.