Hi,
We are using Telerik controls for Silverlight 5 (2013.2.625.1050) and RIA services.
We need grid data in the custom validation for some validation. So in the view model we are adding the grid data to the validation context and trying to use the same in the custom validation method. But it is always returning the 0 records.
Please help.
Regards,
SivaPrasad.B
We are using Telerik controls for Silverlight 5 (2013.2.625.1050) and RIA services.
We need grid data in the custom validation for some validation. So in the view model we are adding the grid data to the validation context and trying to use the same in the custom validation method. But it is always returning the 0 records.
if
(e.Entities !=
null
)
{
var contextItems =
new
Dictionary<
object
,
object
>();
foreach
(EmpDTO emp
in
e.Entities)
{
if
(emp.Emp_CODE != 0)
{
contextItems.Add(emp.Emp_CODE, emp.Emp_ID);
}
}
this
._context.ValidationContext =
new
System.ComponentModel.DataAnnotations.ValidationContext(_context, contextItems);
}
Please help.
Regards,
SivaPrasad.B