This is a migrated thread and some comments may be shown as answers.

RadGrid Batch Edit issue for decimal values

5 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dlogix
Top achievements
Rank 1
dlogix asked on 02 Mar 2014, 08:46 PM
We are facing an issue in radgrid batch editing for cell, if you try to enter a 4 digit value for decimal, it adds a comma in the value and gives the following error upon saving changes:

System.Exception: 1,200.00 is not a valid value for Decimal. ---> System.FormatException: Input string was not in a correct format.

Also tested it on rad grid demo site and same issue is there as well:

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultvb.aspx

Please try entering a 4 digit value for column 'UnitPrice', after entering the value it will add a comma and show error on save changes, however the error is different.

Thanks

5 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 05 Mar 2014, 02:19 PM
Hi Kashif,

As I have explained in the official support ticket you have opened regarding this matter there is a problem in the Batch EditMode where values which contain a group separator are used(please review this link). We are currently researching the matter and will provide a fix for it as soon as possible. For now as a workaround I suggest using a GridBoundColumn without a DataFormatString so that the value can be interpreted as string instead of decimal.

Regarding the problem in the online demo. The UnitPrice field is defined as decimal(5, 2) in the database which means that the number may consist of five digits two of which should be placed after the decimal point. That said entering a value which consists of six digits(so that a group separator can appear) will cause a different kind error and is not related to the above mentioned issue.

Regards,
Angel Petrov
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

0
Murat
Top achievements
Rank 1
answered on 02 May 2014, 10:46 AM
How do we fix this problem? Urgent need.
0
Angel Petrov
Telerik team
answered on 07 May 2014, 11:11 AM
Hello Murat,

One possible workaround for the problem is to use a GridBoundColumn which will treat the long value as a string and will not use a group separator. Another option is to handle things manually by subscribing to the four batch edit events(as demonstrated here) and pass a value which does not contain a group separator to the arguments in the OnBatchEditGetEditorValue event handler.

Please note that we are doing our best to resolve this matter as soon as possible. I hope that our dev team will be able to provide a fix for it for the upcoming official release.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tom
Top achievements
Rank 1
answered on 16 May 2014, 10:03 PM
I need this fix as well.
0
Angel Petrov
Telerik team
answered on 21 May 2014, 03:28 PM
Hello Tom,

The issue is now resolved and if you upgrade to the latest internal build you should not experience any problems. Please test your application thoroughly using the latest version and let us know if you encounter any issues.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
dlogix
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Murat
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Share this question
or