How to display images column in DataTables ?

How to display images column in DataTables ?

headshot9xheadshot9x Posts: 59Questions: 16Answers: 1
edited May 2015 in Free community support

Hello guys, I have a data from JSON string . I want to show images to DataTables , I using fnRender

  "aoColumns": [
                    {
                        "mData": "IMAGE", "aTargets": [0],
                        "fnRender": function (data) {
                            return '<img src="' + data+ '" />';
                        }
                    },

But it's not show . IMAGE from JSON as /Upload/Images/U0001.png
Thank guys.

Answers

  • headshot9xheadshot9x Posts: 59Questions: 16Answers: 1

    ok , i found this . It's work fine

     "aoColumns": [
                        {
                            "mData": "IMAGE", "aTargets": [0],
                            "render": function (data) {
                                return '<img src="' +data+ '" />';
                            }
                        },
    
This discussion has been closed.