Hi Abu
I noted that if you use the inline edit and you have some fields with dropdown lists (from database) the dropdown list doesn't show the choise active but seems behave how was an add action, with the dropdown list without any selection.
However the tooltip of the dropdown shows the choise active.
Then I used the below script:
$col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){setVatDefault();},200); }";
function setVatDefault() {
var vatDefault = $("td[aria-describedby='list2_IDCodiceVat']").attr('title');
if (vatDefault == "undefined") {
var rowid = $('#list1').getGridParam('selrow');
var ifVat = $("#list1").jqGrid("getCell", rowid, "ID4");
if (ifVat != 0)
vatDefault = $("#list1").jqGrid("getCell", rowid, "VatDefault");
else
vatDefault = '';
}
$('#list2 select[name="IDCodiceVat"] option').filter(function() {
return $(this).text() == vatDefault;
}).prop('selected', true);
}
Can you suggest me a better way?
Thanks in advance
Massimo Gagliardi