add images to the datatable column

add images to the datatable column

denizdianadenizdiana Posts: 15Questions: 8Answers: 0

Hello everyone,
I have a datable and I want to add something to it. I fill my datatable from json object,
var table = $('#table').DataTable(
{

                ajax: {
                    "url": "url",
                    "type": "GET",
                    "datatype": "json",
                    "dataSrc": "data"
                },

                aoColumns: [

                    { mData: 'name' },
                    { mData: 'isOn' },
                    { defaultContent: '<input type="button" class="Edit" value="Edit"/><input type="button" class="Delete" value="Delete"/>' }


                ],





            });

If isOn is true, I want to add green circle in that column,if false, i want the red one. How can i do that?
Thanks.

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.