get rendered cell content from column(id, { search:'applied' }).data()

get rendered cell content from column(id, { search:'applied' }).data()

vismarkvismark Posts: 79Questions: 5Answers: 0

Hi, I have a column on which I use custom rendering (as shown here).

Later, I need to obtain the data from that column but table.column(id, { search:'applied' }).data() returns me the original unrendered data. Is there a way to obtain the rendered data instead? Can't find anything about this in the docs...

Thanks

Replies

  • colincolin Posts: 15,146Questions: 1Answers: 2,587

    Hi @vismark ,

    You can use cell().render() or cells().render() for that,

    Cheers,

    Colin

  • vismarkvismark Posts: 79Questions: 5Answers: 0

    Thanks colin for your help. Now, in some cells I use HTML...can I get only the text?

    Moreover, how can i do it pragmatically? Actually I'm using the following cycle, I can't understand how to use the API you suggested in it?

    dt.column(idx, {search: 'applied'}).cache('search').unique().sort().each(function (d, j) {
        console.log(d, j);
    });
    
This discussion has been closed.