This question is locked. New answers and comments are not allowed.
Aurel Constantinescu
Top achievements
Rank 1
Aurel Constantinescu
asked on 11 Mar 2010, 04:25 PM
Hi,
I would like to format the values of a column, with no success.
Which is the format for numeric with no decimals?
I tried, but nothing worked for me.
Thanks,
Aurel
I would like to format the values of a column, with no success.
Which is the format for numeric with no decimals?
I tried, but nothing worked for me.
Thanks,
Aurel
6 Answers, 1 is accepted
0
Hi Aurel Constantinescu,
To format the column values use the Format method of the column. Have in mind though that number formatting is currently supported only in server - binding mode.
You can check the MSDN article for custom number formats.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
To format the column values use the Format method of the column. Have in mind though that number formatting is currently supported only in server - binding mode.
You can check the MSDN article for custom number formats.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Aurel Constantinescu
Top achievements
Rank 1
answered on 11 Mar 2010, 05:20 PM
Thanks,
The best approach so far:
Format("{0:################}");
I tried many formats with no success.
Aurel
The best approach so far:
Format("{0:################}");
I tried many formats with no success.
Aurel
0
Peter
Top achievements
Rank 1
answered on 11 Mar 2010, 05:28 PM
Hi,
You can try .Fomat("{0:F0}");
Regards,
Peter
0
Jeff Taynton
Top achievements
Rank 1
answered on 12 Apr 2010, 04:04 PM
Hello Atanas:
Do you have any suggestions for accomplishing number formatting when using ajax binding?
We have implemented a solution in other areas to include a string "Display" field in our models and then including the original field hidden on the grid and adding custom sorting based on the original field. This is do-able but a lot of extra coding to accomplish. I'd like to know if there is an easier way and/or possibly when number formatting will be supported in ajax binding?
Thanks
Do you have any suggestions for accomplishing number formatting when using ajax binding?
We have implemented a solution in other areas to include a string "Display" field in our models and then including the original field hidden on the grid and adding custom sorting based on the original field. This is do-able but a lot of extra coding to accomplish. I'd like to know if there is an easier way and/or possibly when number formatting will be supported in ajax binding?
Thanks
0
Hi Jeff Taynton,
Right now I can only suggest to use a ViewModel object and expose the formatted number as string.
We will do our best to implement number formatting ASAP however I am afraid it won't be available for the upcoming SP1 release. I guess we will open a new support thread and attach the build there once ready.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Right now I can only suggest to use a ViewModel object and expose the formatted number as string.
We will do our best to implement number formatting ASAP however I am afraid it won't be available for the upcoming SP1 release. I guess we will open a new support thread and attach the build there once ready.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marc
Top achievements
Rank 1
answered on 06 May 2011, 01:40 PM
I don't know if it is a bug, but I can only get custom numeric format strings working with .Format() with a bound decimal field. Oddly, the 'C' named format string does work, but none of the others do.