Hello, The below code will assist you to debug "Column Sorting with checkbox" using Datatable feature. for example: if you like to make click on the feature and in return the whole column with checkbox will get sorted

       "aoColumns": [
            null,
            null,
            null,
            null,
            null,
            { "sSortDataType": "dom-checkbox" },
            null
        ],

$.fn.dataTableExt.afnSortData['dom-checkbox'] = function (oSettings, iColumn) {
            var aData = [];
            $('td:eq(' + iColumn + ') input', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
                aData.push(this.checked == true ? "1" : "0");
            });
            return aData;
        }
hope this help While i have jquery issue in

"Uncaught TypeError: Cannot call method 'fnSetData' of undefined".

and I fixed using the reference link http://datatables.net/forums/discussion/7897/need-help-uncaught-typeerror-cannot-call-method-fnsetdata-of-undefined/p1 the Problem is I missed the red color column highlighted definition like
       "aoColumns": [
            null,
            null,
            null,
            null,
            null,
            { "sSortDataType": "dom-checkbox" },
            null            
        ],
Senthilnathan

0 comments

Related Posts Plugin for WordPress, Blogger...