Column sorts on userDate.userID instead of userDate.userName
Column sorts on userDate.userID instead of userDate.userName
I have a column defined thusly:
[code] {
"sWidth": "20%",
"aaSorting": [[2, "asc"]],
"fnRender": function(obj) {
var userData = obj.aData[obj.iDataColumn];
return ""
+ userData.userName
+ "";
}
},[/code]
It responds to sort / re-sort clicks but sort on the id field instead of name. i'm sure this one's simple
thx
[code] {
"sWidth": "20%",
"aaSorting": [[2, "asc"]],
"fnRender": function(obj) {
var userData = obj.aData[obj.iDataColumn];
return ""
+ userData.userName
+ "";
}
},[/code]
It responds to sort / re-sort clicks but sort on the id field instead of name. i'm sure this one's simple
thx
This discussion has been closed.
Replies
Realizing that the HTML is stripped before being sorted I've inserted a hidden carrying the user name:
"+userData.userName+" at the beginning of the column.