Created Cell String Replace

Created Cell String Replace

Restful Web ServicesRestful Web Services Posts: 202Questions: 49Answers: 2

I am trying to do a simple string replace on the value of certain cells in my table. I thought I could use the created cell function like so to remove the http:// part of the string but it does not work,

                "createdCell" : function(td, cellData, rowData, row, col) {
                    return cellData.replace('http://','');
                 } 

Is there a method to do this correctly?

Thanks

Answers

  • Restful Web ServicesRestful Web Services Posts: 202Questions: 49Answers: 2

    I found the solution,

    "createdCell" : function(td, cellData, rowData, row, col) {
    $(td).html(cellData.replace('http://',''));
    }
    
This discussion has been closed.