Validation with ideablade & telerik

2 posts, 0 answers
  1. Paolo
    Paolo avatar
    426 posts
    Member since:
    Jun 2009

    Posted 12 Dec 2012 Link to this post

    I've got a question on validation with telerik and ideablade's devforce...
    Suppose I've got a simple object defined as

    /// <summary>The auto-generated TAGS class. </summary>
     public partial class TAGS : IbEm.Entity {
       /// <summary>Returns the property path for the given expression. </summary>
       /// <example>
       /// Usage:
       /// <code>
       ///    var r = Employee.PathFor(e => e.Manager.City); // returns "Manager.City"
       /// </code>
       /// </example>
       public static string PathFor(System.Linq.Expressions.Expression<System.Func<TAGS, object>> expr) {
         return IbCore.PropertyPath.For<TAGS>(expr);
       #region Data Properties
       /// <summary>Gets or sets the ID. </summary>
       [Bindable(true, BindingDirection.TwoWay)]
       [Display(Name="ID", AutoGenerateField=true)]
       [IbVal.RequiredValueVerifier( ErrorMessageResourceName="TAGS_ID")]
       public int ID {
         get { return PropertyMetadata.ID.GetValue(this); }
         set { PropertyMetadata.ID.SetValue(this, value); }
       /// <summary>Gets or sets the NOME. </summary>
       [Bindable(true, BindingDirection.TwoWay)]
       [Display(Name="NOME", AutoGenerateField=true)]
       [IbVal.StringLengthVerifier(MaxValue=50, IsRequired=true, ErrorMessageResourceName="TAGS_NOME")]
       public string NOME {
         get { return PropertyMetadata.NOME.GetValue(this); }
         set { PropertyMetadata.NOME.SetValue(this, value); }
       /// <summary>Gets or sets the COLORE. </summary>
       [Bindable(true, BindingDirection.TwoWay)]
       [Display(Name="COLORE", AutoGenerateField=true)]
       [IbVal.StringLengthVerifier(MaxValue=16, IsRequired=true, ErrorMessageResourceName="TAGS_COLORE")]
       public string COLORE {
         get { return PropertyMetadata.COLORE.GetValue(this); }
         set { PropertyMetadata.COLORE.SetValue(this, value); }
       #endregion Data Properties

    (That's generated from Ideablade edmx)

    when I add a new item within a RadDataForm I got that the NOME field is empty ("") but when I hit tab key I got no message saying it's not valid... if I put another value for example "text", then tab, then I re-empty the field I got this time the message saying "NOME field is required" can I've this one fired at the first empty tab?
    Thanks in advance
  2. Yoan
    Yoan avatar
    1128 posts

    Posted 14 Dec 2012 Link to this post

    Hello Paolo,

    I am not sure that RadDataForm can use this IdeaBlade's attribute - [IbVal.StringLengthVerifier(MaxValue=50, IsRequired=true,ErrorMessageResourceName="TAGS_NOME")].

    May I ask you to create a dummy project and send it to me?

    Thank you in advance.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top