I have 2 comboboxes which Works perfect in a create form with a empty model
when I use the same 2 comboboxes in an update form only the first is populated
@(Html.Infragistics().ComboFor(m => m.omvisning.Bestiller_ID).ID("ddBestiller").TextKey("Navn").ValueKey("ID").Width("350px").NullText("Vælg bestiler").FilteringType(ComboFilteringType.Local).AutoComplete(true).DataSourceUrl("/Omvisning/Find_Bestiller").FilterExprUrlKey("filter").ValidatorOptions(o => o.Required(true)).DataBind().Render())
@(Html.Infragistics().ComboFor(m => m.omvisning.Kontakt_ID).ID("ddKontakt").TextKey("Person").ValueKey("ID").Width("350px").FilteringType(ComboFilteringType.Local).AutoComplete(true).DataSourceUrl("/Omvisning/Find_Kontakt").FilterExprUrlKey("filter").NullText("Vælg kontaktperson").CascadingSettings(settings => settings.ParentComboID("#ddBestiller").ParentComboKey("Firma_ID")).DataBind().Render())
I also have this JavaScript
$("#ddBestiller").igCombo({ selectionChanged: ddBestiller_Valgt });$("#ddKontakt").igCombo({ selectionChanged: ddKontakt_Valgt });
function ddBestiller_Valgt(evt, ui) {
if (ui.items != null) {
var id = ui.items[0].value;
var postData = { "ID": id };
$.getJSON("@Url.Content("~/Omvisning/Hent_Bestiller")", postData, function (data) {
if (data.OK == "JA")
{
$("#txtAdresse").text(data.Adresse);
$("#txtPostnr").text(data.Postnr);
$("#txtBynavn").text(data.Bynavn);
$("#txtLand").text(data.Land);
$("#txtEAN").text(data.EAN == null ? "" : data.EAN);
$("#txtSEnr").text(data.SENR == null ? "" : data.SENR);
$("#cbInstitution").prop("checked", data.Institution);
$("#cbSend_Email").prop("checked", data.Send_Email);
$("#cbForening").prop("checked", data.Forening);
$("#ddKontakt").igCombo("getData");
$("#ddKontakt").igCombo("selectedIndex", 0);
$("#ddKontakt").igCombo("activeIndex", 0);
var item = $("#ddKontakt").igCombo("itemByIndex", 0);
if (item.value != null) {
hent_kontakt(item.value);
}
});
return false;
};
function ddKontakt_Valgt(evt, ui) {
hent_kontakt(id);
function hent_kontakt(id)
$.getJSON("@Url.Content("~/Omvisning/Hent_Kontakt")", postData, function (data) {
$("#txtRefnr").text(data.refnr);
$("#txtEmail").text(data.Email);
$("#txtTlf_K").text(data.Tlf);
Hello Christian,
Could you share the product version you have being using? There was a similar issue, (already fixed) regarding the cascading combos used with in MVC wrapper for 12.2, 13.1 and for 13.2 Ignite UI versions.
Could you please try using the latest Service Release for your product version and let me know if it works as expected.
Hello
I use version 14.1
5.14.1.2031
I just upgraded to SR 2249
It did not help
Is it possible for you to share a simple runnable code sample reproducing this issue, so I could further look into this matter for you? I believe I could be of further assistance, if I am able to debug this scenario.
You could attach a code sample to the private case CAS-140947-B4W1T0, if you prefer not to share such in the forum.
Why does it works when the model is empty
and not when there is data in the model
I use ComboFor