Render on columndefs

Render on columndefs

WiliWili Posts: 7Questions: 1Answers: 0
edited August 13 in Free community support

Hallo All,
I'm Newbie , need help for this issue,
i have get and pass the data from query(store procedure), i have check the result from query, there only 27 records, but why after i pass into datatable, the record become 27 * 27 = 729 records ? (showing on the datatable is 27, but when take it the data in columndef -render , that become 729 rec?
Anyone can help me ? i just want the data is 27. Thank You

below is the code :

var tabledet = $('#tb-datatable-detail').DataTable( {
        "paging": false,
        "autoWidth": true,
        "order": [[ 1, 'asc' ]],
            data: datas,
            scrollX: true,
                {title:'ID',data: "id", defaultContent: "",orderable:false},
                {title:'GROUP MENU',data:0},
                // {title:'kond',data:2,width:50,visible:false}
            columnDefs: [ {
            "searchable": false,
            "orderable": false,
            "targets": [2],
            "render": function(data,type,full,meta) {
                const arr = []
                const newArr = data.split(',')
                let obj = Object.entries(newArr)
                for(let i = 0; i < newArr.length; i++) {

                let localObj = {}
                localObj["value"] = newArr[i]

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


  • colincolin Posts: 12,600Questions: 0Answers: 2,154

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.



Sign In or Register to comment.