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

[Solved] Localization DataFormatString Error

4 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
NGA TQ
Top achievements
Rank 1
NGA TQ asked on 21 Feb 2011, 09:26 AM
Hi!
How can I localize DataFormatString Error of RadGrid View "Input is not in a correct format" when enter invalid data in the column ( enter "abc" in this column)
<telerik:GridViewDataColumn TextAlignment="Right" Header="Unit Price" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}" />

Thank a lot

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 21 Feb 2011, 09:48 AM
Hi,

You may take a look at our online documentation and blogs for a reference.
 

Best wishes,
Maya
the Telerik team
0
Deborah
Top achievements
Rank 1
answered on 22 Jun 2011, 10:42 AM
Hi Maya,
sorry but I'm not able to localize the string "Input is not in a correct format".
I have a column which contains numeric values. I'm able to set an error message (for example if the number is less than 10) using the CellValidating event, and it works. But if a user enter some letters the message "Input is not in a correct format" is displayed, and I don't understand how I can change the string.
0
Maya
Telerik team
answered on 23 Jun 2011, 09:23 AM
Hi Deborah,

This error is built-in and the Framework is the one that handles it, not RadGridView. You may either again subscribe to the CellValidating event and perform the logic there (just as it is in the example) or follow the approach illustrated in this forum thread.
 

All the best,
Maya
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
Deborah
Top achievements
Rank 1
answered on 23 Jun 2011, 09:37 AM
Hi Maya,
the silverlight forum thread is not helping me, I think the best thing is (as you suggest) perform all the logic in the cellvalidating event, in order to avoid the silverlight message "input is not in a correct format".
Thank you very much,
Deborah
Tags
GridView
Asked by
NGA TQ
Top achievements
Rank 1
Answers by
Maya
Telerik team
Deborah
Top achievements
Rank 1
Share this question
or