Input for WinForms | ComponentOne
In This Topic
    Data Parsing
    In This Topic

    Data modified by the end user in a C1Input control is converted from a string to a typed Value. Converting data from a string representation is called parsing. It is the opposite of formatting. Parsing is controlled by the ParseInfo property. The ParseInfo property provides access to the ParseInfo  Class that contains sub-properties that control different aspects of parsing.

    For the most part, you will probably be satisfied with the default parsing that is performed according to the format specification, as it is the inverse of formatting. By default, the same format property value is used for parsing as for formatting. However, you can change any of aspects of how the control parses, by expanding the ParseInfo property, changing the (Inherit) flags, and setting desired properties.

    The ParseInfo class also contains two flag properties, NumberStyle and DateTimeStyle, which enable you to fine-tune parsing by allowing or disallowing white spaces and special characters in input strings for numeric and date-time data. For more information see the ParseInfo class in the reference section.

    By setting the FormatType property to UseEvent, you can make your parsing entirely custom through writing code to handle the parsing action in the Parsing event.