See a combo is not popular, that's what I do. The combo is populated, there I need to get the id and show in the combo the text referring to that ID. The ID I have in my table, just need to show the text in the combo. My jquery looks like this:
function CarregaDados(ajaxParameter) {
$.ajax({
url: '/CadastroAcesso/CarregaDadosPagina',
datatype: 'json',
contentType: 'application/json;charset=utf-8',
type: 'POST',
data: JSON.stringify({ _nivel: ajaxParameter }),
success: function (data) {
$.each(data, function (index, itemData) {
$('#txtNome').val(itemData.NM_Usuario);
$('#txtUsuarioRede').val(itemData.Usuario1);
$('#txtEmail').val(itemData.Email);
//$('#cbxNivelAcesso').val();
});
},
error: function (error) {
}
})
}
cbxNivelAcesso is my combo. It's commented because I tested it in many ways and nothing.