我的场景:
我有一个 w2ui 数据网格,数据通过调用 Rest api 来自远程服务器。
我可以在浏览器调试器中看到响应数据,但在网格中看不到。
请帮忙。我的代码和 Firebug 快照如下。
非常感谢您的任何提示。
$(function () {
$('#grid').w2grid({
method: 'GET',
crossDomain: true,
url: 'https://im-dev....net/bp/development/DETDS/Claims' + sSomeIds + sSession,
dataType: 'json',
name: 'grid',
recid: 'clmNumber',
show: {
selectColumn: true,
toolbar: true,
footer: true,
toolbarSave: true
//toolbarAdd: true
},
columns: [
{field: 'busUnit', caption: 'busUnit', size: '150px'},
{field: 'catCodeC', caption: 'catCodeC', size: '150px'},
{field: 'clmStatus', caption: 'clmStatus', size: '150px'},
{field: 'clmStatusDesc', caption: 'Status', size: '150px'},
{field: 'ctryCd', caption: 'Country', size: '100px'},
{field: 'ctryDesc', caption: 'ctryDesc', size: '100px'},
{field: 'department', caption: 'department', size: '80px'},
{field: 'empName', caption: 'Requester', size: '140px'},
{field: 'empcnum', caption: 'empcnum', size: '80px'},
{field: 'enddate', caption: 'enddate', size: '80px'},
{field: 'flmrgScr', caption: 'flmrgScr', size: '80px'},
{field: 'groupCode', caption: 'groupCode', size: '80px'},
{field: 'histScr', caption: 'histScr', size: '80px'},
{field: 'imt', caption: 'IMT', size: '80px'},
{field: 'iot', caption: 'IOT', size: '80px'},
{field: 'mgrcnum', caption: 'mgrcnum', size: '80px'},
{field: 'mgrname', caption: 'FLM', size: '140px'},
{field: 'submitdate', caption: 'submitdate', size: '80px'},
{field: 'clmNumber', caption: 'clmNumber', size: '80px'},
{field: 'tepeScr', caption: 'tepeScr', size: '80px'},
{field: 'tranScr', caption: 'tranScr', size: '80px'}
],
onSubmit: function (event) {
w2alert('save');
}
});
});