when I'm sending JSON response to jqgrid I get "undefined" message across it and Firebug is telling me this:
b.jgrid.formatter is undefined
[Break On This Error]
...input===true){b(".ui-pg-input",l).val(a.p.page);h=a.p.toppager?"#sp_1"+m+",#sp_1...
which basically doesn't tell me much.
This happens when I'm sending empty response:
{"total":0,"page":1,"records":0,"rows":[]}
or response with records. Records are then visible in grid. After this "undefined" message is shown up, I can't browse through pages as, of course, the bug in code appeared.
As @Oleg suggested I'm providing here additional info:
- These are javascripts I'm using:
jquery.validate.min.js jquery.validate.unobtrusive.min.js jquery-1.5.1.min.js jquery-ui-1.8.11.min.js jquery.jqGrid.min.js ui/jquery.ui.core.js ui/jquery.ui.widget.js ui/jquery.ui.datepicker.js
- My javascript source:
var grid = jQuery("#list").jqGrid({ datatype: 'json', caption: 'Transaction Log', hiddengrid: 'true', postData: { companyId: function () { return $("#SelectedCompany").val(); }, userId: function () { return $("#SelectedUser").val(); }, dateFromString: function () { return $("#DateFrom").val(); }, dateToString: function () { return $("#DateTo").val(); } }, url: '@Url.Action("GetTransactionLogData")', mtype: 'GET', colNames: ['Ref.', 'TradeDate', 'Status', 'LegalEntity', ...], colModel: [ { name: 'Reference', index: 'Reference', width: '60' }, { name: 'TradeDate', index: 'TradeDate', width: '70' }, { name: 'Status', index: 'Status', width: '50' }, { name: 'LegalEntity', index: 'LegalEntity', width: '80' }, ... ], pager: $('#pager'), rowNum: 10, height: '100%' });
- I've downloaded last version of jqGrid from [this link][1], it's says it's **4.4.0** version.
How can I solve this?
Thanks in advance.
jquery.jqGrid.src.js
instead ofjquery.jqGrid.min.js
2) you should specify the exact version of jqGrid which you use 3) you should include the list of JavaScript files which you loaded on the page. The order of loading could be very important. 4) you should include the JavaScript code which defines jqGrid. – Jarvisjary