Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
[Visual Basic]
Public Event FormatText As FormatTextEventHandler
[C#]
public event FormatTextEventHandler FormatText
[Delphi]
public property FormatText: FormatTextEventHandler read remove_FormatText write add_FormatText;
Remarks
The FormatTextEventArgs.Value property contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.
Example
The following code creates a FormatText event handler that is raised when the cells in the second column are rendered and its C1DataColumn.NumberFormat property is set to FormatTextEvent:
' Set the number format of a column to be "FormatTextEvent".
Me.C1TrueDBGrid1.Columns(1).NumberFormat = "FormatTextEvent"
Private Sub C1TrueDBDropdown1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FormatTextEventArgs) Handles C1TrueDBGrid1.FormatText
e.Value = e.value & "west"
End Sub
· C#
// Set the number format of a column to be "FormatTextEvent".
this.c1TrueDBGrid1.Columns[1].NumberFormat = "FormatTextEvent";
private void c1TrueDBDropdown1_FormatText(object sender, C1.Win. C1TrueDBGrid.FormatTextEventArgs e)
{
e.Value = e.value & "west";
}
· Delphi
// Set the number format of a column to be "FormatTextEvent".
Self.C1TrueDBGrid1.Columns[1].NumberFormat := 'FormatTextEvent';
procedure C1TrueDBDropdown1_FormatText(sender: System.Object; e: C1.Win.C1TrueDBGrid.FormatTextEventArgs);
begin
e.Value := e.value + 'west';
end;
See Also
C1TrueDBDropdown Class | C1TrueDBDropdown Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |