Results 1 to 4 of 4

Thread: How to set a tooltip on a grid cell

  1. #1

    Default How to set a tooltip on a grid cell

    I want to set a tooltip on a grid cell. The best I can come up with is using a GridCellRenderer and returning a SPAN element. Is there a better approach?

    Code:
    
    
    ColumnConfig description =
    new ColumnConfig("description", "Description", 150); description.setRenderer(new GridCellRenderer<BeanModel>(){ public String render(BeanModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BeanModel> store) { String value = model.get(property).toString(); if ( value != null) { StringBuilder html = new StringBuilder(); html.append("<span title='"); html.append(value); html.append("' >"); html.append(value); html.append("</span>"); value = html.toString(); } return value; } });

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    I believe the next release will support adding normal tooltips to grid

  3. #3

    Default

    can we have tooltips for grid rows ? is this available in the current EXT-GWT library ?

    thanks !

  4. #4

    Default Displaying a tooltip in a grid cell

    You might try adapting the technique used in this forum post to display tooltips in your grid.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •