Hi Allow,
I am using an entity datasource on a grid and allowing auto inserts, updates and deletes. Everything seems to be working fine accept while trying to delete i am getting the following:
Error while setting property 'freightRate': '$222.00 is not a valid value for Decimal.'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.UI.WebControls.EntityDataSourceValidationException: Error while setting property 'freightRate': '$222.00 is not a valid value for Decimal.'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[EntityDataSourceValidationException: Error while setting property 'freightRate': '$222.00 is not a valid value for Decimal.'.]
System.Web.UI.WebControls.EntityDataSourceView.ConvertProperties(IDictionary values, PropertyDescriptorCollection propertyDescriptors, ParameterCollection referenceParameters) +71835
System.Web.UI.WebControls.EntityDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +386
System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +89
Telerik.Web.UI.GridTableView.PerformDelete(GridEditableItem editedItem, Boolean suppressRebind) +265
Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +4320
Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
|
I have no code behind (nice) and the column markup looks like:
<
telerik:GridNumericColumn UniqueName="freightRate" SortExpression="freightRate"
HeaderText="Freight Rate" DataField="freightRate" ColumnEditorID="GridNumericColumnEditor1"
FooterText="Freight Rate" NumericType="Currency" DataType="System.Decimal">
</telerik:GridNumericColumn>
Is it because the NumericType? Should i use a Dataformatstring instead? thanks.
rw