COLUMN SORTING USING SERVER SIDE DATA !!!!!!!!!!!!!!!!!!!!!!!

COLUMN SORTING USING SERVER SIDE DATA !!!!!!!!!!!!!!!!!!!!!!!

RevoltRevolt Posts: 2Questions: 1Answers: 0
edited June 2014 in Free community support

I WANT TO SORT A COLUMN BY OTHER THAN THE TEXT I DISPLAY AND I CAN'T GET IT WORKING.

THE DOCUMENTATION SAYS SOMEWHERE THAT THE (UNKNOWN, WEIRD, MEANINGLESS) _ ATTRIBUTE MUST BE DEFINED, AND SOMEWHERE ELSE SAYS THAT IT'S OPTIONAL.

IN SOME EXAMPLES, THE (NOT WORKING) SORT ATTRIBUTE IS PLACED INSIDE THE OBJECT DATA AND IN OTHER EXAMPLES IT'S PLACED INSIDE THE OBJECT RENDER. WHAT IS THE CORRECT PLACE FOR IT OR WHAT IS THE DIFFERENCE?

I HAVE THE FOLLOWING DATA

    {
        "id": "1842",
        "createdAt": {
            "content": "May 31, 23:49",
            "timestamp": 1401572940
        }
    }

AND THE CONFIGURATION

columns: [
    {
        data: "id"
    }, {
        data: "createdAt",
        render: {
            _: "content",
            display: "content",
            sort: "timestamp"
        }
    }
]

AND THE SORTING IS TOTALLY RANDOM AND IRRATIONAL.

ALSO, THE MIXING OF COLUMNDEFS AND COLUMNS IN DOCUMENTATION AND EXAMPLES IS SO CONFUSING AND ANNOYING.

HOW IS THIS POSSIBLE? I CHANGED IT TO A SIMPLE INTEGER AND IT STILL CAN'T SORT.

This discussion has been closed.