Hi,
Thanks for contacting Syncfusion.
To get the first child text in
generic dropdown control when page loads, we suggest you to use
clientside event "ClientSideOnLoaded".
Please refer the following code snippet.
<code>
[.cshtml]
@{Html.Syncfusion().GenericDropDown("myDropDown").Width(300).TargetContentId("drop-down-contents").ClientSideOnClick("ClientSideOnClick")
.PopupPanelWidth(300).ClientSideOnLoaded("ClientSideonLoad").Render();
}
<script type="text/javascript">
function ClientSideonLoad(sender, args) {//debugger
var ddtext = $("div.gddChildItem:first")[0].firstChild.data;
sender.setText(ddtext);
}
</script>
</code>
Kindly let us know if you have further queries.
Warm Regards,
Gurunathan A
Gdd_dropdown_888bdbdb.zip