Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How can I render the below model in tree structure and bind it to form?

$
0
0

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:

  1. Q1
  2. Q2a) 2Qab) 2Qb
  3. Q3

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>