Hide connections From and To from model in edit mode

1 posts, 0 answers
  1. Michelle
    Michelle avatar
    2 posts
    Member since:
    Jul 2010

    Posted 25 Sep 2015 Link to this post

    .Model(m =>
        m.Id(c => c.WorkflowTypeEventID);
        m.Field(c => c.WorkflowTypeEventID).Editable(false);
        m.Field(c => c.Name).Editable(true);
        m.Field(c => c.Description).Editable(true);
        m.Field(c => c.SortOrder).Editable(false);
        m.Field(c => c.EventType).Editable(false);
        //m.Field(c => c.WorkflowTypeStateID).Editable(false);
        //m.Field(c => c.NextWorkflowTypeStateID).Editable(false);
        m.From(c => c.WorkflowTypeStateID);
        m.To(c => c.NextWorkflowTypeStateID);


    When I uncomment out the two lines both items are hidden when editing the connection but they do not pass the values to the Create method. If I comment them both out and create a connection it will pass both values to the models Create method.

     I am looking to hide both on edit but still send the values to the controller.


Back to Top