My JsonResult as follows
[{"name":"Group 1"},{"name":"Group 2"},{"name":"Group 3"}]
I'm little bit confused while writing for loop, so How to iterate over this or get the values of name inside buildSelect function in editoptions in jqGrid? My colModel code in jqGrid as follows
{ name: 'GroupName', index: 'GroupName', width: 60, align: 'center', search: false, editable: true, edittype: 'select',
editoptions: {
dataUrl: "/Category/GetCategoryGroup",
buildSelect: function (response) {
if (response && response.length) {
// for loop iteration to get name values
}
}
}
},