JQgrid Auto Complete functionality for a textbox using Jquerry
colModel: [
{ name: 'Name', index: 'Name', width: 100, editable: true, editoptions: { readonly: false, size: 25 } },
{
name: 'UserName', index: 'UserName', width: 100, editable: true, editoptions: {
dataInit: function(e) {
$(e).autocomplete({
source: availableTags,
minLength: 1,
focus: function(event, ui) {
$(e).val(ui.item.label);
},
classes: {
"ui-autocomplete": "highlight"
},
select: function(event, ui) {
$(e).val(ui.item.label);
$("input#UserName").val(ui.item.value);
}
});
}
}
},
{ name: 'Name', index: 'Name', width: 100, editable: true, editoptions: { readonly: false, size: 25 } },
{
name: 'UserName', index: 'UserName', width: 100, editable: true, editoptions: {
dataInit: function(e) {
$(e).autocomplete({
source: availableTags,
minLength: 1,
focus: function(event, ui) {
$(e).val(ui.item.label);
},
classes: {
"ui-autocomplete": "highlight"
},
select: function(event, ui) {
$(e).val(ui.item.label);
$("input#UserName").val(ui.item.value);
}
});
}
}
},
Comments