Assign textarea html

Assign textarea html

mgmaccamgmacca Posts: 2Questions: 1Answers: 0

I need to declare/use one column as textarea (because it contains a lot of text, and the row is too high and uselsess).
Formatting cell as textarea I could/should be able to scroll the contains into the cell, having the row high in na reasonable way.

The table is defined in this way:

var tab_updates = $(\'#updates_list\').DataTable( { 
"columns": [
{ mData: \'Prog_id\' } ,             //<-- this field is numeric
{ mData: \'Update_date\' } ,     //<-- this field is data (YYYY-MM-DD)
{ mData: \'Home_visit\' },         //<-- this field is a flag
{ mData: \'Operator1\' },          //<-- this fiels is a text
{ mData: \'Operator2\' } ,         //<-- this fiels is a text
{ mData: \'Updates\' },             //<--- this file should be treated as textarea, and not as text, since I'd scroll data contained into the cell
{ mData: \'Action\' }
],

        "columnDefs": [ {
            "targets": -1,
            "data": null,
            "defaultContent": "<label id=\"mod_par\"class=\"agg-par text-primary\"><i class=\"fas fa-edit\"></i>Update</label>"
        },



            { className: \'text-right\', targets: [0] },
            { className: \'text-center\', targets: [1,2,3,4] }      
        ],

"ajax": ({ 
        url:"exec_updates.php",
        type:"POST",
        data:{id:' .$Prog_id .' },
        dataType:"json"
        }),

"scrollX": true,
"scrollY":        \'50vh\',
        "scrollCollapse": true,
        "paging":         false,
"autoWidth": true,
"aoColumns": [
            { "sType": "html-num-fmt" },
            null,
            null,
            null,
            null,
            null,
            null
            ],

language: {
            url: \'dataTables.italian.json\'
        },

.......
.......
.......

Thanks
Massimo

Answers

Sign In or Register to comment.