columns data vs. sInt & sName
columns data vs. sInt & sName
 e8416o8            
            
                Posts: 25Questions: 9Answers: 1
e8416o8            
            
                Posts: 25Questions: 9Answers: 1            
            Following is an excerpt:
If I use data, then data are not shown in the table. But if I changed data to sInt & sName, data are shown in the table.
Why is that?
    $('#example').DataTable( {
        
        dom: 'Bfrtip',
    type: 'POST',
        bServerSide: true,
        sAjaxSource: "folder/myServlet",
        bProcessing: true,
        spagingType: 'full_numbers',
        bJQueryUI: true,
        select: true,
        columns: [
        { "sInt": "id",
                    "bSearchable": false,
                    "bSortable": false,
                    "bVisible": false  },
            { "sName": "payerID" },
            { "sName": "payerName" },
            { "sName": "contractID" },
            { "sName": "insCo" },
            { "sName": "insType" },
            { "sName": "groupID" },
            { "sName": "eff" },
            { "sName": "term" }
        ],
/* another version with data
           { data: "id",
                    "bSearchable": false,
                    "bSortable": false,
                    "bVisible": false },
            { data: "payerID" },
            { data: "payerName" },
            { data: "contractID" },
            { data: "insCo" },
            { data: "insType" },
            { data: "groupID" },
            { data: "eff" },
            { data: "term" }
*/            
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
            
Answers
columns.datatells DataTables where to get the data for each cell.columns.nameassigns a name to the column and can be used for selectors.If it isn't working for you, please link to a test case showing the issue.
Allan
I changed to as follows. Now data are shown.
Thanks for your response, Allan.