Dear All,
I have created a project using EF4, RIA Service, few telerik controls.
I define my client-side validation using .shared files and add then using DataAnotation to the metadata class as follows:
MetaData:
I then populate the subsidary_id with data using QDSCV (no Problem here)
I then add the xaml definition as follows:
The validation works as soon as I open the page, I don't know why, but anyway that is not the problem, the problem is that the subsidary_id combobox is displaying the error but with different message says "Input is not in correct format".
I don't know from where is that comes? how to stop / override?
Note:
I have another RadDatePicker that has different validation method,
when I set a break point in the client-side validation class the validation method for the date field is hit, but not the combo.
Any help !!
I have created a project using EF4, RIA Service, few telerik controls.
I define my client-side validation using .shared files and add then using DataAnotation to the metadata class as follows:
public
static
class
CustomDailyValidation
{
public
static
ValidationResult ValidateSubsidiary(
int
id, ValidationContext validationContext)
{
if
(id <= 0 || id ==
null
)
{
return
new
ValidationResult(
"ERROR"
,
new
[] {validationContext.DisplayName});
}
return
ValidationResult.Success;
}
}
MetaData:
[CustomValidation(
typeof
(CustomDailyValidation),
"ValidateSubsidiary"
)]
public
int
subsidiary_id {
get
;
set
; }
I then populate the subsidary_id with data using QDSCV (no Problem here)
I then add the xaml definition as follows:
<
telerik:RadComboBox
x:Name
=
"discriptorId"
Margin
=
"0,0,0,5"
Grid.Row
=
"1"
Grid.Column
=
"3"
IsEnabled
=
"{Binding IsNew}"
ItemsSource
=
"{Binding Path=DiscriptorsCollection,Mode=TwoWay}"
SelectedValue
=
"{Binding Path=CurrentDaily.discriptor, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}"
SelectedValuePath
=
"discriptor_id"
DisplayMemberPath
=
"discriptor_name_1"
/>
The validation works as soon as I open the page, I don't know why, but anyway that is not the problem, the problem is that the subsidary_id combobox is displaying the error but with different message says "Input is not in correct format".
I don't know from where is that comes? how to stop / override?
Note:
I have another RadDatePicker that has different validation method,
when I set a break point in the client-side validation class the validation method for the date field is hit, but not the combo.
Any help !!