FormatProvider Property

Specifies format provider used for converting between value and text.
Public Property FormatProvider As IFormatProvider
public IFormatProvider FormatProvider {get; set;}

FormatProvider is used to convert between text and the value. The editor will use this along with Format property setting to convert the value to text for display purposes. Note that when editing, only the FormatProvider will be used and the Format property will be ignored. This is to facilitate easier editing of values without the clutter of formatting symbols.

The default behavior can be changed by providing custom conversion logic using Infragistics.Windows.Editors.ValueEditor.ValueToTextConverter and Infragistics.Windows.Editors.TextEditorBase.ValueToDisplayTextConverter properties.

Note: FormatProvider property is of type IFormatProvider interface. IFormatProvider is implemented by CultureInfo object therefore this property can be set to an instance of CultureInfo. You can also use DateTimeFormatInfo or NumberFormatInfo as these implement the interface as well.


Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also