I assume you want to display devices for a customer ?
In your example you extend the dropdown $("#ddl_Deviceid") with the selected $("#ddl_Deviceid") value. You may want to fill the devices depending on the value of customer.
$.ajax({
type:
url: '@Url.Action("GetReport", "Report")',
dataType: 'json',
data: { id: $("ddl_Custid").val() },
success: function (datas, status) {
var duplicate = [];
$("#ddl_Deviceid").append('<option value="-1">' + "All" + '</option>');
$.each(datas, function (i, data) {
if (duplicate.indexOf(data.fld_custid) == -1) {
$("#ddl_Deviceid").append('<option value="' + data.fld_custid + '">' + data.fld_custid + '</option>');
duplicate.push(data.fld_custid);
}
});
}
});