Customizing Strings for Numeric and Date/Time Columns
The C1FlexGrid control includes properties that determine how numeric values and dates/times are displayed. To set these properties, select FlexGrid Numeric Column or FlexGrid DateTimeColumn from the drop-down next to the appropriate field and view the Appearance group.
Specifying Numeric Values
You can customize how numeric values are displayed and their alignment within a column using the Appearance group of the FlexGrid Numeric Column element.
Choose the appropriate option for the Format String property:
Currency | Formats the data as currency. |
Exponential | Formats the data in scientific notation. |
Fixed Point | Formats the data in integral and decimal digits (including negative signs). |
General | Formats the data in the most compact option; either fixed point or scientific notation. |
Numeric | Formats the data as a number like this: 1,235. |
Percent | Formats the data as a percentage. |
Custom | Enter your own custom format for the data. |
When you choose <Custom> you can enter your own format string in the text box that will appear when this option is selected. To learn more about creating custom strings, see http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.71).aspx.
The Text Alignment property defaults to Right, but you can change this to Left or Center using the drop-down.
Specifying Date Time Values
You can customize how date and time values are displayed using the Appearance group of the FlexGrid DateTime Column element.
First, choose the Edit Mode property. You can choose to change the display for dates, times, or both.
Choose the appropriate option for the Format String property:
• Short Date
• Long Date
• Long Date, Short Time
• Long Date, Long Time
• General Date, Short Time
• General Date, Long Time
• Short Time
• Long Time
• Month Day
• Year Month
• <Custom>
When you choose <Custom> you can enter your own format string in the text box that will appear when this option is selected. To learn more about creating custom strings, see http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.71).aspx