I do have an assessment model having n- number of child assessment models. I want to render AssessmentNode models as form elements (for ex: TextBox HTML element) in a tree structure. A form can have many assessment node elements.
I have used the LIFO Stack class to render the model in UI. I am looking to bind the poped node into Form.
public class Assessment{ public Guid ID { get; set; } public string Name { get; set; } public List<AssessmentNode> Nodes { get; set; } public List<Connector> Connectors { get; set; }}public class AssessmentNode{ public Guid NodeID { get; set; } public string Question { get; set; } public string Answer { get; set; } public bool HasChildNode { get; set; }}public class Connector{ public Guid ConnectorID { get; set; } public string Name { get; set; } public string SourceNodeId { get; set; } public string TargetNodeId { get; set; }}How can I render the nodes into tree structure in UI and bind it to form?
For example:
- Q1
- Q2a) 2Qab) 2Qb
- Q3