mDataProp (objects), bServerSide = true, and sNames
mDataProp (objects), bServerSide = true, and sNames
jamesW
Posts: 2Questions: 0Answers: 0
First, excellent piece of javascript magic. It would seem that I have a problem using DataTables 1.8.2. I'm using the mDataProp inside of aoColumns to use objects (specifically a map) in my server code as the cell values but at the same time I want to reorder the columns. I saw where I could do this with using the sNames properties for each column and the sColumns JSON to be returned. Everything works fine with those three arguments and my JSON so long as I don't change the sColumns JSON's order. I'm afraid I can't post example code but I did do some debugging and it would seem the error is on line 3600 where datatables.js is trying to use my data as an array of arrays (aaData[][]). I need the server to decide the column order and I'd like to keep the data in objects if at all possible. Does any one have any suggestions or am I going about doing this the wrong way?
Any help would be greatly appreciated. To reproduce just set the server side to true, set the columns mDataProp values and the sNames values. In the server script just reverse the order of the sColumns (and yes I double checked I'm not putting backwards names back on the client :-)) and you can see the error.
Any help would be greatly appreciated. To reproduce just set the server side to true, set the columns mDataProp values and the sNames values. In the server script just reverse the order of the sColumns (and yes I double checked I'm not putting backwards names back on the client :-)) and you can see the error.
This discussion has been closed.
Replies