DataForm Validation - ValidatingItem()

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 20 Nov 2012 Link to this post


    i'm validaitin my Item with "ValidatinItem="MyForm_ValidatinItem":
    private void VerbindungForm1_ValidatingItem(object sender, System.ComponentModel.CancelEventArgs e)
    var employer = this.VerbindungForm1.CurrentItem as Verbindungen;
    if (employer.Name.Count() < 1)
    RadWindow.Alert("You have to enter a " + employer.Name);

    This Works fine, but is it possible to chance the background of this fild now? Or set a border with Tooltip? And how do i stop the Comit if the Validation is false?

    Thanks Best Regards
  2. Yoan
    Yoan avatar
    1053 posts

    Posted 23 Nov 2012 Link to this post

    Hello Rene,

    I suggest you to check this help article, where you can find information about how to validate RadDataForm

     When defining custom fields you can specify the validation properties in the binding and perform the logic inside the property setter. This would be recommended approach if you want to stop the commit when the validation is false. For your convenience, I have prepared a sample project for you. Please find it attached. 

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top