My Code:
function onLoad(e)
{
var element = document.getElementById('cmbGender');
$.ajax({ type: "POST",
url: "@(Url.Action("LoadGenderNames", "Search"))",
success: function (data) {
// How to add the "data" object items in to the combo box here.
},
});
}
How to add items(object) to the combobox inside the function(data). Thanks.
EDIT:
It is the Telerik combobox Html.Telerik().ComboBox() .Name(“cmbGender”)
If you want to bind combobox by ajax you can use next code: