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

[Solved] Telerik Grid & IvalidatableObject

0 Answers 17 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dharmesh
Top achievements
Rank 1
Dharmesh asked on 04 Jan 2012, 10:07 AM
I am using Telerik grid with in-line editing mode. I want to put business validation on some field and which i am trying to achieve using IValidatableObject interface and i am able to validate it but my error message not displayed in UI.

public new System.Collections.Generic.IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {
            if (true)
            {
                yield return new ValidationResult("Duplicate Name Not Allowed", new[] { "Name" });
            }
        }

name is one of the column in telerik grid. do i have to specify @html.ValidationMessageFor in cshtml? if yes then where.

Can anybody give some example.
Tags
General Discussions
Asked by
Dharmesh
Top achievements
Rank 1
Share this question
or