How to add radiobutton and Image with each rendering column in datatable?

How to add radiobutton and Image with each rendering column in datatable?

deeptierxdeeptierx Posts: 5Questions: 0Answers: 0

Hi ,
I am displaying from data from database using datatable plugins in jsp. I have to customize this plugin and display radiobutton and image with each column displaying data Please help. I am new to JQuery I have done following code to display data.

$(document).ready(function() {

var oTable = $("#DataTableExample").dataTable( {
    "bProcessing": false,
    "bServerSide": false,
    "sort": "position",
    "sAjaxSource": "./PaginationServlet",
    "aoColumns": [
                  { "mData": "name" },
                  { "mData": "speciality" },
                  { "mData": "qualification" },


              ]
} );

} );

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    I would suggest looking at columns.render if you need to dynamically create HTML for columns rather than having it in the data source.

    Allan

  • deeptierxdeeptierx Posts: 5Questions: 0Answers: 0

    Hi Allan Thanks for reply can you share some sample code here . I am very new to query data tables. your help will be appreciated.

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    There are examples in the documentation page I linked to above showing how to dynamically create HTML based on the data in the row.

    If you need further help, please provide full details about what you required, along with a data sample. The Quick Support 60 option would cover the work required.

    Allan

This discussion has been closed.