First of all, I introduce a text in the city input, city input is autocomplete(Jquery UI), and then I select a locality and press enter. Afterwards I add new field to search. When I press new field, jqgrid clears city field.
This is a part of my code.
{
name:'City',
index:'City',
width:220,
align:"center",
sortable:true,
editable:true,
edittype:'select',
editoptions:{
value:load_City
},
stype:'text',
searchoptions:{
dataInit:function(el){
$(el).autocomplete({
selectFirst:true,
source: "Codigo/Datos/localidades.php?autocomplete=verdadero"
})
},
sopt:['eq','ne','lt','le','gt','ge']
}
}