I have this line of code in a radGrid template:
and it is working fine.
My problem is that I would like to show the format "€" but if I add the formatting like this:
on the first insert of the new record the formatting is not shown yet then the record is saved without problems;
if I open again the record, this time the formatting is visible and if I update the record it gives an error on the input string formatting.
Error:
How do I solve this problem?
Thanks,
Felice
<
asp:TextBox
ID
=
"TextBox12"
runat
=
"server"
Text='<%# Bind( "valuePCS" ) %>'></
asp:TextBox
>
My problem is that I would like to show the format "€" but if I add the formatting like this:
<
asp:TextBox
ID
=
"TextBox12"
runat
=
"server"
Text='<%# Bind( "valuePCS", "{0:C0}" ) %>'></
asp:TextBox
>
on the first insert of the new record the formatting is not shown yet then the record is saved without problems;
if I open again the record, this time the formatting is visible and if I update the record it gives an error on the input string formatting.
Error:
[FormatException: Formato della stringa di input non corretto.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10896279
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145
System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46
System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +297
System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +126
System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63
System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +535
System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +324
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +87
Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +430
Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +2063
Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +205
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +372
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +252
System.Web.UI.WebControls.Button.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) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
How do I solve this problem?
Thanks,
Felice