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

Again validation...

0 Answers 8 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vit100
Top achievements
Rank 1
Vit100 asked on 09 Nov 2011, 05:10 PM
Scenario: RIA application, with RadGridView on client side.

Server Domain Object has property with Required attribure and looks like this:

public class Person
    public string Name {get;set;}
    [Required]
    public Address Age{get;set;}

DomainContext class returns data like this:
[Query]
public List<Person> GetPersons(){
    var l = new List<Person>();
    l.add(new Person{Name="Person with Age", Address=new Address(){blah blah}};
    l.add(new Person {Name="BAD record, address is not set"});
    return l;
}

Problem:
1. GUI should show (aka Grid mark) all rows where initially Address is not set, so user can see which records must be updated. In this case second row should be marked, and as  result domainContext should not be called for Submit()..
2. If user adds record into grid, it is immediately marked invalid until Address is set.


No answers yet. Maybe you can help?

Tags
GridView
Asked by
Vit100
Top achievements
Rank 1
Share this question
or