Tooltips for Cells

Posted by: nchalla on 15 September 2019, 5:36 pm EST

    • Post Options:
    • Link

    Posted 15 September 2019, 5:36 pm EST

    Hi,

    How to get the tooltip for a cell if the content in the cell is not fitting?

    Thanks.

  • Posted 16 September 2019, 5:51 pm EST

    Hi,

    For displaying tooltips, you could use the column presenter feature to set the title attribute for the cell which in turn would display the tooltip. Please refer to the following code snippet, For reference, I’ve also attached the sample implementing the same

    var cols = [
      {
        id: 'title',
        caption: 'Title',
        dataField: 'title',
        presenter: '<div title="{{=it.title}}">{{=it.title}}</div>'
      },
    ...otherColumns
    ];
    var dataView = new GC.DataViews.DataView(document.getElementById('grid'), data, cols, new GC.DataViews.GridLayout());
    

    You could also refer to the following sample demonstrating the use of column presenters:

    https://www.grapecity.com/dataviewsjs/demos/Features/Columns/ColumnPresenters/purejs

    Regards

    Sharad

    Features_Columns_ColumnPresenters.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels