how render other column data in datatable columndefs...

how render other column data in datatable columndefs...

immortalhemrajimmortalhemraj Posts: 3Questions: 2Answers: 0
edited January 2019 in Free community support
"columns": [{
                    "data": "seriel"
                }, {
                    "data": "sa_id"
                }, {
                    "data": "open"
                    "render": function(data, type, row, meta){
                        if(type === 'display'){
                            data = '<a href="User.jsp?date1=' + date1 + '&&date2='+ date2 +'&&status='+ 'Open' +'&&sa_id='+ ..... +'">' + data + '</a>';
                        }
                        
                        return data;
                     }
                 }
            ]

EDIT: Updated post to use Markdown Code formatting.

Answers

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947

    I guess you are asking about date1 and date2 in this line:

    data = '<a href="User.jsp?date1=' + date1 + '&&date2='+ date2 +'&&status='+ 'Open' +'&&sa_id='+ ..... +'">' + data + '</a>'

    date1 and date2 need to be variables available within the scope of where you initialized Datatables. If this doesn't help then please provide a description of the problem you are having.

    Kevin

This discussion has been closed.