Hi,
I am developing a MVC5 web application and populating a dropdownlist control using the WebApiAdaptor to make a REST call.
When I try and select an item it does not select it.
Below is the code I am using to populate and select a value in the dropdown control.
<script>
//Page loaded
$(function ()
{
$("#drpStatus").ejDropDownList({
dataSource: ej.DataManager({
url: "GetStatusType",
adaptor: new ej.WebApiAdaptor()
}),
fields: { text: "Name", value: "Code" }
}).data("ejDropDownList").selectItemByValue("HOLD");
});
</script>
Are you able to tell me where I am going wrong?
Thanks