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

Problem when validation with InputControl Q2 2010 !!!

3 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
balv
Top achievements
Rank 1
balv asked on 21 Jul 2010, 11:28 AM

Hi all,
I have just a problem with validation when using the new Q2 2010 (0714)  telerik released dll.
I cannot show full error message when validation with RadCombobox and RadDatePicker( just have a very small red box appeared)
I tested with normal ComboBox (Silverlight Control) and error message when validate is very good. But when I replace by RadComboBox then has this inconvenience.
I guess because telerik inputcontrol.???

You can see below image to understand this problems

Thanks in advance,
Best regards,
balv

3 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 21 Jul 2010, 11:53 AM
Hello ba luu van,

 Could you please post the code of your *Validating event handlers?

Best wishes,
Yavor Georgiev
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
balv
Top achievements
Rank 1
answered on 23 Jul 2010, 06:03 AM

I have just a problem with validation when upgrade from 2010_1_603 to Q2 2010 (0714)  telerik released dll.

I renewed a simple demo with database northwind
I marked conditions to validate in EmployeeMetadata class

Friend NotInheritable Class EmployeeMetadata
         
       'Metadata classes are not meant to be instantiated.
       Private Sub New()
           MyBase.New
       End Sub
         
       Public Property Address As String
       <CustomValidation(GetType(TestCustomValidation), "CompareDate")> _
       Public Property BirthDate As Nullable(Of DateTime)
         
       Public Property City As String
         
       Public Property Country As String
         
       Public Property Employee1 As Employee
         
       Public Property EmployeeID As Integer
         
       Public Property Employees1 As EntityCollection(Of Employee)
         
       Public Property Extension As String
       <Required()> _
       <StringLength(20)> _
       Public Property FirstName As String
       <CustomValidation(GetType(TestCustomValidation), "CompareDate")> _
       Public Property HireDate As Nullable(Of DateTime)
         
       Public Property HomePhone As String
       <Required()> _
       Public Property LastName As String
         
       Public Property Notes As String
         
       Public Property Photo() As Byte
         
       Public Property PhotoPath As String
         
       Public Property PostalCode As String
         
       Public Property Region As String
         
       Public Property ReportsTo As Nullable(Of Integer)
         
       Public Property Title As String
         
       Public Property TitleOfCourtesy As String
   End Class

and shared class:

Imports System.ComponentModel.DataAnnotations
Imports System
  
  
Partial Public Class TestCustomValidation
    Public Shared Function CompareDate(ByVal BeginDate As Nullable(Of DateTime), ByVal ctx As ValidationContext) As ValidationResult
        Dim lstMemberName = New String() {ctx.MemberName}
        Dim result As ValidationResult = ValidationResult.Success
        If ctx.ObjectInstance IsNot Nothing AndAlso TypeOf (ctx.ObjectInstance) Is Employee Then
            Dim objTest As Employee = CType(ctx.ObjectInstance, Employee)
            If DateTime.Compare(objTest.BirthDate, objTest.HireDate) > 0 Then
                result = New ValidationResult("BirthDate cannot after HireDate", lstMemberName)
            End If
        End If
        Return result
    End Function
End Class

Case1: You can edit FirstName to "" or string with length>20 to see problem
Case2: You can edit BirthDate or HireDate where BirthDate > HireDate to see problem


Thanks in advance,
Best regards,
balv

0
Konstantina
Telerik team
answered on 28 Jul 2010, 01:43 PM
Hello balv,

Thank you for contacting us and for the screenshots.

This is a known issue and it is already resolved. Please try with our latest internal build and get back to us if you still experience the issue.

Regards,
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
General Discussions
Asked by
balv
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
balv
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or