Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

"Unknown parameter" issue due to (apparently) unidentified mData property

$
0
0
Hi! I'm building a DataTable that pulls in data from an AJAX call, and unfortunately, I'm facing the (apparently common) "unknown parameter" issue. Specifically, here's the error message I'm getting:

"DataTables warning (table id = 'accountAssigner_brandShareTable'): Requested unknown parameter '0' from the data source for row 0"

I've found many posts on the forum dealing with this same error, but none of them had an answer that fit my scenario.

Here's my debugger output: http://debug.datatables.net/osegud

When I expand the "Columns" section, I see that the "mData" property for each column appears to be "undefined", which I imagine is the source of the problem. I'm not sure why it's undefined, though, since - as far as I can tell - my DataTable declaration is pretty straightforward:
$('#accountAssigner_brandShareTable').dataTable(
{
    "bProcessing": true,
    "bDestroy": true,
    "bFilter": false,
    "bSort": false,
    "bPaginate": false,
    "sAjaxSource": "<%= Page.ResolveClientUrl("ajax/account-assigner-get-share.ashx") %>",
    "fnServerParams": function ( aoData ) 
    { 
        aoData.push( { "name": "companyId", "value": brandId } );
    },
    "sAjaxDataProp": "Data",
    "aoColumnDefs": [
                        { "aTargets": [0], "mData": "UserId"},
                        { "aTargets": [1], "mData": "UserName" },
                        { "aTargets": [2], "mData": "PercentShare" }
                    ],
    "fnInitComplete": accountAssigner.loadModal
});
Seems like "mData" is defined for every column. I'm not really sure what to think of this. I'd really appreciate any advice anyone might have!

(If there's any more data that I should provide, please let me know.)

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>