How to use more than one renderer callback ??

How to use more than one renderer callback ??

shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0
edited April 2018 in Free community support

Hi Allan,

I need to hyperlink a column and also i need to set number of characters to display(i.e. ellipsis plugin) to the same column. How do i do that??
By https://datatables.net/plug-ins/dataRender/ellipsis i can set number of characters to the column, but i can't make it Hyperlink as well.
Help me.

I tried using .display() as You answered here https://datatables.net/forums/discussion/comment/98237/#Comment_98237 but am getting console error saying $.fn.dataTable.render.ellipsis(...).display is not a function

Thanks & regards,
-SHASHIDHAR

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited April 2018 Answer ✓

    Hi @shashidharnk ,

    I struggled with that example too. This blog page here gives clues on what to do - see the first comment.

    Take a look at this example here - I've done what you're asking using that info. It's truncating the field, then URLing it.

    Hope that helps,

    Cheers,

    Colin

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    It should be:

    $.fn.dataTable.render.ellipsis(...options...)(data, 'display');
    

    Allan

This discussion has been closed.