pop up mouse over text

pop up mouse over text

soma1204soma1204 Posts: 34Questions: 6Answers: 0

Hi,

i have table with one column value has more text, want to display in text text fits in one line and display all text when we do mouse over on it.
Is this possible? if yes, could you please provide test case.

Thanks
Soma

Answers

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794

    Sounds like the ellipsis rendering plugin will do what you want.

    Kevin

  • soma1204soma1204 Posts: 34Questions: 6Answers: 0
    edited March 2022

    Can we use this along with hiding columns.

    tried following way , it didn't work.

    "columnDefs": [
                {
                    "targets": [2, 3, 6, 7, 12],
                    "visible": false,
                                  targets: 10,
                    render: $.fn.dataTable.render.ellipsis( 20, true )
    
                }
            ],
    

    Following one worked.

     "columnDefs": [
                {
                                              targets: 10,
                    render: $.fn.dataTable.render.ellipsis( 20, true )
    
                }
            ],
    

    Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794

    They need to be separate objects, like this:

    "columnDefs": [
                {
                    "targets": [2, 3, 6, 7, 12],
                    "visible": false,
                },
                {
                    targets: 10,
                    render: $.fn.dataTable.render.ellipsis( 20, true )
     
                }
            ],
    

    Kevin

Sign In or Register to comment.