I am trying to populate a jqGrid search form using a SELECT element. In the colModel for the interested column I have
searchoptions: {
dataUrl: '<%: Url.Content("~/Contact/GetCustomers") %>',
buildSelect: function (response) {
var theSelect = "<select>";
$.each(response, function (i, data) {
theSelect += '<option value="' + data.Value + '">' + data.Text + '</option';
});
theSelect += "</select>";
},
sopt: ['eq', 'ne']
}
the remote method GetCustomers return a json result formatted as
[{"Selected":false,"Text":"David Gilmour","Value":"10"},
{"Selected":false,"Text":"Eric Clapton","Value":"26961"},
{"Selected":false,"Text":"Joan Baetz","Value":"26972"}]
but with the code that I have used for the each function I am getting the following error