BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Marie,
Thanks for contacting Syncfusion forums.
Your requirement of updating the text of selected item in GenericDropdown textbox can be achieved using the “setText()” client side method. Please refer the below code snippet,
<code>
@{Html.Syncfusion().GenericDropDown("myGenericDropDown").ClientSideOnClick("ClientSideOnClick").Render();} // This event will be triggered on item select
[Script]
function ClientSideOnClick(sender, args) {
var text = "";
if (args._target.nodeName.toLowerCase() == "img")
text = $(args._target.parentNode).text().trim();
else
text = args._text;
sender.setText(text); // This method will set the text in textbox
}
</code>
We have also prepared a simple sample with GenericDropdown with databinding as per your code snippet and it can be downloaded from the below link.
Kindly have a look at the sample and let us know if your requirement is met.
Regards,
Meena
Hi Marie,
Thanks for the update.
We are glad to know that your issue has been solved. Kindly get back to us if you need further assistance.
We will be happy to help you out.
Regards,
Meena