Hi Eddie,
We have
validated your reported query and prepared the sample based on your
requirement. We can achieve your requirement by using value property of
the listbox and textbox.
[Index.cshtml]:
|
@using Syncfusion.EJ2.Inputs
@using Syncfusion.EJ2.DropDowns
<div id="listbox-control">
@Html.EJS().ListBox("listbox").DataSource((IEnumerable<object>)ViewBag.data).Render()
</div>
<div class="multiline_wrapper">
@Html.EJS().TextBox("default").Multiline(true).Placeholder("Listbox
Data").Created("OnCreated").Render()
</div>
<script>
function OnCreated() {
document.getElementById("listbox_parent").ondblclick = () =>
{
var listBox = ej.base.getComponent(document.querySelector('#listbox'), 'listbox');
var textBox = ej.base.getComponent(document.querySelector('#default'), 'textbox');
textBox.value = listBox.value;
};
}
</script>
|
Could you please check the above
code and get back to us, if you need any further assistance on this.
Regards,
YuvanShankar
A