Gets or sets the custom Format Provider that will be used to format the cell's data.
Property Value
A reference to a class that implements the
System.IFormatProvider interface.
The first example modifies the
System.Globalization.DateTimeFormatInfo.DateSeparator property of an instance of a
System.Globalization.DateTimeFormatInfo object and then assigns the DateTimeFormatInfo object to the FormatProvider property. The second example, modifies the DateTimeFormatInfo object in the same manner but also specifies the format of the cell to display the contents in "short date" format:
' FormatProvider Dim dtfi As New System.Globalization.DateTimeFormatInfo dtfi() dtfi.DateSeparator ="/" gridControl1.DataRowTemplate.Cells( "Date1" ).FormatProvider = dtfi ' FormatProvider AND FormatSpecifier gridControl1.DataRowTemplate.Cells( "Date2" ).FormatProvider = dtfi gridControl1.DataRowTemplate.Cells( "Date2" ).FormatSpecifier = "d"
// FormatProvider System.Globalization.DateTimeFormatInfo dtfi = new System.Globalization.DateTimeFormatInfo(); dtfi.DateSeparator = "/"; gridControl1.DataRowTemplate.Cells[ "Date1" ].FormatProvider = dtfi; // FormatProvider AND FormatSpecifier gridControl1.DataRowTemplate.Cells[ "Date2" ].FormatProvider = dtfi; gridControl1.DataRowTemplate.Cells[ "Date2" ].FormatSpecifier = "d";
Target Platforms: Windows 7, 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