I got a basic jqGrid working in my coldfusion project. One of my fields in jqGrid is a combo box. Currently the editoption values are hard coded just like below.
<
The $.getJSON / getSequenceNumbers() answer does not work as presented. There is no way to return data from a callback as the return value for getSequenceNumbers() because the callback is asynchronous. You either need to use the dataURL method suggested by Martin or setup the jqGrid inside of the $.getJSON callback.
$(document).ready(function() {
$.getJSON("GetURL", function(data) {
setupGrid(data);
});
});
function setupGrid(data) {
...
colModel :
[
{
name:'seqnum',index:'seqnum', width:100,resizable:true,
align:"left",sorttype:"text",editable:true,edittype:"select",editoptions:
{ value:data},editrules:{required:true}
}
]
...
}