I would like to render a view that will be bound to a custom data adaptor (already working). The model looks like the following...
The custom data adaptor will return zero or more of the above model.
I would like to be able to add new Validator (simple name property) as the outer-most-level , then be able to add 1 or more RuleSets inner-level (also just a simple name property), followed by a data grid or FieldValidationRule items.
Possibly something like the depiction below, but open to other UI layouts...
The entire schema represents the document that is returned by the custom data adapter.
The following are the models. I can change any aspect of the model if it would be easier to bind to the component.
public class Validator
{
public System.Guid AggregateRootModelReferenceId {get; set;}
public System.Guid DomainElementModelReferenceId {get; set;}
public string ValidatorRoslynScript {get; set;}
public List RuleSets {get; set;}
public Guid ValidatorId {get; set;}
}
public class RuleSet
{
public string Name {get; set;}
public List FieldValidationRules {get; set;}
public Guid RuleSetId {get; set;}
}
public class FieldValidationRule
{
public Guid DomainElementFieldModelRefenceId {get;set}
public Guid ErrorDescriptionResId {get;set}
public Guid ToolTipDescriptionResId {get;set}
public Guid PropertyNameResId {get;set}
public string ErrorCode {get;set}
public string Parameter1 {get;set}
public string Parameter2 {get;set}
public string Parameter3 {get;set}
public string Parameter4 {get;set}
public string Parameter5 {get;set}
public string Parameter6 {get;set}
public string ErrorDescription {get;set}
public string ToolTipDescription {get;set}
public string CustomRuleType {get;set}
public string NameOfProperty {get;set}
public string ItemTypeName {get;set}
public SeverityLevel SeverityLevel {get;set}
public ConditionType ConditionType {get;set}
public ValidateMode ValidateMode {get;set}
public CascadeMode CascadeMode {get;set}
public RuleType RuleType {get;set}
public Guid ParentFieldValidationRuleId {get;set}
public Guid FieldValidationRuleId {get;set}
}
I am familiar with SF TreeView and DataGrid, just not sure how to stitch this together as a single component that queries via the data adaptor to allow me to edit each of the above depicted sections.
How can I show and add and edit new Validators and manage related RuleSets and related FieldValidationRules from the custom data adaptor using multiple SF databound control types so as to achieve the above editable layout?