Creating an anchr tag in Datatables

Creating an anchr tag in Datatables

bscan48bscan48 Posts: 2Questions: 1Answers: 0

I want to change a table column to an anchor tag for an Ajax sourced table.

This is how I'm trying to set it up.

$(document).ready(function() {
    $('#pwo_colors').DataTable( {
ajax: 'php/table.pwo_colors.php',
        columns: [
            { data: 'color' }
        ],            
        "paging":       false,
            "ordering":     false,
            "searching":    false,
            "info":         false,
        "scrollY":      "400px",
            "createdRow": function( row, data, dataIndex ) {
                var color = data.color;
                   data.color = '<a href="pwo_color.php?Color=' + color + '">' + color + '</a>';

                    $(row).addClass( 'Row' );

                }
} );

} );

My addClass line works as expected, but the "data.color = line" does nothing. In the debugger I see the value change.
but it isn't reflected in the browser. (both IE and Firefox)

This discussion has been closed.