Posted 13 June 2021, 11:11 pm EST
Hello!!
I’m working on a form to modify already loaded data, and I can’t get the c1-multi-auto-complete to load the data, it always shows as none item selected.
My model has a property with an array of IDs and list of objects with data:
public SelectList Transportes { get; set; } //data
public long[] TransportesSeleccionados { get; set; } //list of IDs
My code in view:
@{
var transportesSeleccionadosModificar = Model.Transportes.Where(t => Model.TransportesSeleccionados.Contains(long.Parse(t.Value)));
}
<c1-multi-auto-complete for="TransportesSeleccionados"
selected-values="transportesSeleccionadosModificar"
display-member-path="Text"
selected-value-path="Value"
css-match="highlight" class="form-control">
<c1-items-source source-collection="Model.Transportes"></c1-items-source>
</c1-multi-auto-complete>
Any suggestion on what I’m doing wrong?
Thanks in advance!