Home › Forums › WinForms controls › Xceed Grid for WinForms › Formatting for numbers
-
AuthorPosts
-
#12989 |
Does anyone have any code samples to use to help formatting of numbers?
I would like to be able to insert commas into large number cells.
I would rather display 1,333,444,555 instead of 1333444555.
Thanks.
Imported from legacy forums. Posted by Rick (had 4036 views)
Use a format provider like so
Column c = grid.Columns[“Blah”]
System.Globalization.NumberFormatInfo numformat = new System.Globalization.NumberFormatInfo();
numformat.CurrencySymbol = String.Empty;
numformat.CurrencyPositivePattern = 0;
numformat.CurrencyNegativePattern = 1;c.FormatProvider = numformat;
c.FormatSpecifier = “c”;Peter Henry
IT RevolutionImported from legacy forums. Posted by Peter (had 335 views)
Use a format provider like so
Column c = grid.Columns[“Blah”]
System.Globalization.NumberFormatInfo numformat = new System.Globalization.NumberFormatInfo();
numformat.CurrencySymbol = String.Empty;
numformat.CurrencyPositivePattern = 0;
numformat.CurrencyNegativePattern = 1;c.FormatProvider = numformat;
c.FormatSpecifier = “c”;Peter Henry
IT RevolutionImported from legacy forums. Posted by Peter (had 328 views)
Use a format provider like so
Column c = grid.Columns[“Blah”]
System.Globalization.NumberFormatInfo numformat = new System.Globalization.NumberFormatInfo();
numformat.CurrencySymbol = String.Empty;
numformat.CurrencyPositivePattern = 0;
numformat.CurrencyNegativePattern = 1;c.FormatProvider = numformat;
c.FormatSpecifier = “c”;Peter Henry
IT RevolutionImported from legacy forums. Posted by Peter (had 386 views)
when I tried this code I got an error message Xcced.Wf.DataGrid.Column does not contain a definition for ‘FormatProvider’??????????
Imported from legacy forums. Posted by dalia (had 303 views)
This is code for the Grid for .NET. The error you got refers to the WPF DataGrid, a different product.
Imported from legacy forums. Posted by CharlesB (had 4959 views)
-
AuthorPosts
- You must be logged in to reply to this topic.