how to use Jquery Datatables Ellipsis renderer for template field link button?

前端 未结 1 882
天涯浪人
天涯浪人 2020-12-06 11:53

When I am using that with Asp-bound field it\'s working perfectly

look column one is Ellipsed

But when using

1条回答
  •  时光取名叫无心
    2020-12-06 12:31

    A link in the GridView should look like this

    VDWWD
    

    But after Ellipsis it looks like this

    
    

    As you can see it made a complete mess of the HTML and it's no wonder the browser does not know what to do with it.

    On top of that it seems that this function doesn't do anything or does not gets called:

    .fn.dataTable.render.ellipsis = function ( cutoff, wordbreak, escapeHtml )
    

    Take a look on this page how it is done https://datatables.net/blog/2016-02-26

    I made the following snippet. It checks if an href is present in the string and if there is, skips the trimmming of the string.

    
    

    0 讨论(0)
提交回复
热议问题