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

Grid throws error on delete on currency column

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Farhan
Top achievements
Rank 1
Farhan asked on 08 Sep 2011, 08:18 PM
Hi,
    I need some info on this issue since i cant find any documentation on this. I am using entity framework with ObjectDatasource and RadGrid. all the rest (Update,insert) commands are working fine but when I try delete this is the error i get "$5,450.36 is not a valid value for Decimal" . I have automatic deletes turned on the grid. On the backend I have a column of decimal (18,2) to store the currency data. How can I keep the currency formatting and get rid of this error on delete please let me know, I have tried 

DataformatString = "{0:c}"    and NumericType = "Currency"

but none of these are working?? please see below for my grid column definition. Please let me know how to do this as it is urgently needed. Thanks in advance

<telerik:GridNumericColumn  DataField="payment_rate" DataType="System.Decimal" NumericType="Currency"  UniqueName="payment_rate" AutoPostBackOnFilter="true"   HeaderText="Payment Rate" DecimalDigits="2">
 <HeaderStyle HorizontalAlign="Left" Width="10%" />
    <ItemStyle HorizontalAlign="Left" />
 </telerik:GridNumericColumn>

2 Answers, 1 is accepted

Sort by
0
Farhan
Top achievements
Rank 1
answered on 09 Sep 2011, 02:40 PM
Anybody from Telerik? Im not seeing much help online for this issue?
0
Maria Ilieva
Telerik team
answered on 12 Sep 2011, 02:43 PM
Hi Farhan,

Please refer to the forum thread below which discusses the same issue:
http://www.telerik.com/community/forums/aspnet-ajax/grid/entity-datasource-allowautomaticdeletes-true-gt-cannot-delete-quot-not-a-valid-value-for-decimal-quot.aspx

Greetings,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Farhan
Top achievements
Rank 1
Answers by
Farhan
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or