Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82099

Add Link Column to DataTable

$
0
0

I have a datatable in which the data (from the database) is being filled with ajax, I also want a new tablerow with "Details" to show more details , but the table only allows data from the database.

I also read all documentation , but still no luck :(

              <table id="OrdrerList">
                    <thead>
                        <tr>

                            <th>Name</th>
                            <th>Details</th>

                        </tr>

                    </thead>
                    <tbody>
                    </tbody>
                </table>
    $('#OrdrerList').DataTable({

        "processing": true,
        "serverSide": true,

        ajax: {
            url: '@Url.Action("GetClosedRMA", "User")',
            dataType: 'json',
            contentType: 'application/json; charset=utf-8',
            data: 'dataSet'

        },
        columns: [

            { data: "Name" },
            { data: What should be here ? Details is just text and its not coming from database, 
             "render": function (data, type, full, meta) {
             return '<a href="/User/RMAClose?Name=' + full.Name+ '">some text</a>';
          } }
            
        ]
        "order": [0, "Asc"]

    });

Viewing all articles
Browse latest Browse all 82099

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>