fields.TeamId[this]; set => fields.TeamId[this] = value; } [DisplayNa" /> fields.TeamId[this]; set => fields.TeamId[this] = value; } [DisplayNa" /> fields.TeamId[this]; set => fields.TeamId[this] = value; } [DisplayNa"/>

how to use cascade dropdown in serenity?

13 Views Asked by At
[DisplayName("Team"), LookupEditor(typeof(TeamRow))]
public int? TeamId
{
    get => fields.TeamId[this];
    set => fields.TeamId[this] = value;
}

[DisplayName("Assigned To"), LookupEditor(typeof(UserRow), cascadfrom = "TeamId"),         TextualField("Username")]
public int? AssignedTo
{
   get => fields.AssignedTo[this];
   set => fields.AssignedTo[this] = value;
}

I create a Serenity form with team and user columns. now i have to select the dropdown users based on the team. the team have multi select in user table. can anyone help me with this

1

There are 1 best solutions below

0
David Lawrence On
 public inputID: number;
 protected afterLoadEntity() {
     super.afterLoadEntity();
     this.inputID = this.entity.TeamId;
     this.form.AssignedTo.cascadeValue = 6;
 }

Try using this code in dialog.ts file.