How to add tooltip on button in column?

How to add tooltip on button in column?

RajeshVRajeshV Posts: 9Questions: 8Answers: 0

I have a gird make one column button but i want to add tooltip effect.

Answers

  • GregPGregP Posts: 500Questions: 10Answers: 0

    Tooltips are not "built into" DataTables (that I'm aware of! I haven't been actively involved lately!) which leaves you free to add your own. Depending on the library you use, you will likely end up binding the tooltip functionality to the document somehow.

    Then (again, depending on the library), it is triggered by meeting certain criteria. For example, you might end up using the createdRow or createdCell initialization options to render some of your data into a data-attribute.

    In the same method (createdRow or createdCell), you might be invoking your tooltip plugin:

    $(td).find('.tooltip').tooltip();
    

    Or, somewhere in your application if the tooltip plugin supports it, it might be even more simple:

    $(selector).tooltip();
    

    And the plugin would bind a listener to selector so that it is triggered on hover of an element with a certain class.


    Sorry this is all very general, but the important thing to recognize is that this is not a DataTables support issue, strictly speaking. It's more a matter of understanding the tooltip plugin. However, it could become a DataTables support question in a small way if it's absolutely necessary to bind or re-bind the tooltip on render of each row. Suffice it to say, DataTables does not directly provide the tooltip support.

This discussion has been closed.