Hi,
I would
kindly ask your support.
In my model
I have a string html formatted like this:
string ao_RequestInfo
= "<b>Inserted by: </b> user <b> on </b>
29/09/2020 </br><b>Reason: </b> xxxxxx"
in my view:
<ejs-textbox
id="ao_RequestInfo"
multiline="true"
readonly="true"
floatLabelType="Always">
</ejs-textbox>
<ejs-multiselect
id="so_OtherOperation"
dataSource="@Model.StandardOperations"
mode="Box"
allowFiltering="true"
filtering="onfilteringOtherStandardOperation">
<e-multiselect-fields text="so_Name"
value="so_ID"></e-multiselect-fields>
</ejs-multiselect>
I would
give the previous string as a value of a multiline textbox, on page load AND,
always on page load, I would prefill the multiselect with some values from my
model but I see only the last one
(I'm not
able to push the value in the multiselect)
<script>
window.onload
= function () {
[....]
document.getElementById("ao_RequestInfo").ej2_instances[0].value =
Mymodel.ao_RequestInfo;
var txt;
txt =
document.getElementById("ao_RequestInfo").ej2_instances[0].value;
document.getElementById("ao_RequestInfo").innerHTML = txt;
[...]
var i;
for (i = 0; i < myModel.otherOperationList.length; i++)
{
document.getElementById("so_OtherOperation").ej2_instances[0].text =
myModel.otherOperationList[i].addItem;
}
</script>
Thanks a
lot