jQWidgets Forums

jQuery UI Widgets Forums Grid Cellsrenderer and Tooltips

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  GrantLetourneau 11 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Cellsrenderer and Tooltips #26982

    GrantLetourneau
    Participant

    I’m using cellsrenderer and want to set a tooltip. I saw this thread:

    http://www.jqwidgets.com/community/topic/grid-tooltip/

    Which said “As you are using custom cells rendering, you can provide a tooltip by setting the title attribute to the returned HTML string.”

    I don’t understand where I would set that.

    What would I change in this simple code:

    var rend_test = function (row, columnfield, value, defaulthtml, columnproperties) {
    var formattedValue = replace("abc","xyz")
    return '<span style="float: ' + columnproperties.cellsalign + ';">' + formattedValue + '</span>';
    };
    ......
    $("#jqxgrid").jqxGrid(
    {
    enabletooltips: true,
    columns: [
    ,{ text: 'ColName', datafield: 'SomeField', width: 75, cellsrenderer: rend_test }
    ......
    Cellsrenderer and Tooltips #26992

    Peter Stoev
    Keymaster

    Hi GrantLetourneau,

    May be your string should be:

    	return '<span title="' + formattedValue + '" style="float: ' + columnproperties.cellsalign + ';">' + formattedValue + '</span>';

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Cellsrenderer and Tooltips #26998

    GrantLetourneau
    Participant

    But that would just change what shows up in the actual cell, not in the associated tooltip, right?

    Or would that keep the original tooltip? I’m curious about that “title” item mention in the previous post, because it seems it can be used to create custom tooltips for each cell.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.