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

not null with guid validation error

6 Answers 73 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
allyk
Top achievements
Rank 1
allyk asked on 15 Apr 2010, 09:20 AM
Hi,
If radcombobox bind to not null guid field, Although, I validated with required from metadata, when clicked to the save button in dataform it gives input string not in a correct format error. How can I handle this situation?

Thanks

6 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 15 Apr 2010, 04:31 PM
Hello,

Could you please, open a new support ticket and send us a simple application that demonstrates the problem? We will reply with a solution ASAP.

Regards,
Valeri Hristov
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
tungnt185
Top achievements
Rank 2
answered on 28 Apr 2010, 09:53 AM

Hi Valeri,
I've a same problem with binding RadComboBox with a not null field type guid and is a table key.
I'm using WCF RIA Service and validate require in metadata of this field.
When binding it to the combo's SelectedValue as:

SelectedValue="{Binding FieldID, NotifyOnValidationError=True,   
ValidatesOnExceptions=TrueMode=TwoWay}" 
It throw an exception like this:
Message: Can't convert type null to type System.Guid.  
StackTrace: at MS.Internal.Data.DynamicValueConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) at System.Windows.Data.BindingExpression.UpdateValue() 

I don't know how to resolve this. Please show me a workaround. Thanks
0
tungnt185
Top achievements
Rank 2
answered on 06 May 2010, 03:11 AM
Have anybody already face problems same to me?
0
Konstantina
Telerik team
answered on 12 May 2010, 08:00 AM
Hi Taufik Hidayat,

Sorry for the late response.

Will Guid.Empty do the job for a default value? It is static property of Guid class and this way your property won't have null as default value.

If you have any other questions about our controls please feel free to contact us again.

Best wishes,
Konstantina
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
tungnt185
Top achievements
Rank 2
answered on 20 May 2010, 12:45 PM
Hi Constantina

I've just try as you said but my error still remain.
When InitObject I assign it with a guid.empty but RadComboBox still throw this exception
I don't know how to resolve this now.

Please help me. Thanks
0
Konstantina
Telerik team
answered on 25 May 2010, 03:15 PM
Hi Taufik Hidayat,

Could you please open a support ticket and send us a sample project in which this issue can be observed? In that way we will be able to assist you in the best manner.

Looking forward to your reply.

Sincerely yours,
Konstantina
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.
Tags
ComboBox
Asked by
allyk
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
tungnt185
Top achievements
Rank 2
Konstantina
Telerik team
Share this question
or