Requested unknown parameter 'luser' from the data source
Requested unknown parameter 'luser' from the data source
I've found similar problems reported on the forum, but I can find nothing wrong.... any ideas would be greatly appreciated!
Here is the data and I'm using sAjaxSource.:
[code]
{"aaData":
[
{
"version": "v3afaZd5",
"luser": "package4@ablelinktech.com",
"key": "addd6e7d-45fd-48e7-bff6-63b192272ede",
"package": "foo",
"channel": "TestIt"
},
{
"version": "v3afaZd5",
"luser": "shane",
"key": "a4a7eeab-da1e-4dcf-915f-9854e796d070",
"package": "foo",
"channel": "TestIt"
}
]
}
[/code]
Here is the Javascript - I'm using aoColumns with mDataProp - as you can see, the property it's looking for (luser) is in the data properly
[code]
addDataTable = function() {
var lTableCfg, updateCustId, url;
url = root.objAddr + 'licenseSetList/' + root.custId;
lTableCfg = {
bProcessing: true,
bFilter: true,
bSort: true,
bPaginate: false,
sPaginationType: "two_button",
sScrollY: "75%",
bScrollInfinite: true,
bJQueryUI: true,
sDom: '<"H"pf>t<"F"ir>',
bScrollCollapse: true,
sAjaxSource: url,
aaSorting: [[0, "asc"]],
aoColumns: [
{
mDataProp: "luser",
bUseRendered: true,
bSortable: true,
sWidth: "33%"
}, {
mDataProp: "package",
bSortable: false,
sClass: "centerMe",
sType: "numeric"
}, {
mDataProp: "channel",
bSortable: false,
sClass: "centerMe",
sType: "numeric"
}, {
mDataProp: "version",
bUseRendered: true,
bSortable: false,
sClass: "centerMe"
}, {
mDataProp: "key",
bUseRendered: true,
bSortable: true,
sClass: "centerMe"
}, {
fnRender: function(oObj) {
var html;
html = '\n Modify\n Delete\n';
return html;
},
bSortable: false,
sWidth: "66px"
}
]
};
[/code]
Here is the data and I'm using sAjaxSource.:
[code]
{"aaData":
[
{
"version": "v3afaZd5",
"luser": "package4@ablelinktech.com",
"key": "addd6e7d-45fd-48e7-bff6-63b192272ede",
"package": "foo",
"channel": "TestIt"
},
{
"version": "v3afaZd5",
"luser": "shane",
"key": "a4a7eeab-da1e-4dcf-915f-9854e796d070",
"package": "foo",
"channel": "TestIt"
}
]
}
[/code]
Here is the Javascript - I'm using aoColumns with mDataProp - as you can see, the property it's looking for (luser) is in the data properly
[code]
addDataTable = function() {
var lTableCfg, updateCustId, url;
url = root.objAddr + 'licenseSetList/' + root.custId;
lTableCfg = {
bProcessing: true,
bFilter: true,
bSort: true,
bPaginate: false,
sPaginationType: "two_button",
sScrollY: "75%",
bScrollInfinite: true,
bJQueryUI: true,
sDom: '<"H"pf>t<"F"ir>',
bScrollCollapse: true,
sAjaxSource: url,
aaSorting: [[0, "asc"]],
aoColumns: [
{
mDataProp: "luser",
bUseRendered: true,
bSortable: true,
sWidth: "33%"
}, {
mDataProp: "package",
bSortable: false,
sClass: "centerMe",
sType: "numeric"
}, {
mDataProp: "channel",
bSortable: false,
sClass: "centerMe",
sType: "numeric"
}, {
mDataProp: "version",
bUseRendered: true,
bSortable: false,
sClass: "centerMe"
}, {
mDataProp: "key",
bUseRendered: true,
bSortable: true,
sClass: "centerMe"
}, {
fnRender: function(oObj) {
var html;
html = '\n Modify\n Delete\n';
return html;
},
bSortable: false,
sWidth: "66px"
}
]
};
[/code]
This discussion has been closed.
Replies
If this isn't what you expected to happen - what did you expect?
Allan
I updated the data above and to match and verified that the code and data above are getting the error I posted about.
[code]
DataTables warning (table id = 'licenseTable'): Requested unknown parameter 'luser' from the data source for row 1
[/code]
but with 3 rows, it will say "row 2". The data in the first row doesn't get displayed, but the all rows after that do. Here is a screen shot: http://goo.gl/7nkw2
Allan