Results 1 to 3 of 3

Thread: Icon as Table Cell Content

  1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    60
    Vote Rating
    0
      0  

    Default Icon as Table Cell Content

    Hi,

    I have a Table that loads is data (? extends BaseModel) from the server. The data class contains a string field called 'mediaType' and I would like to draw an icon (depending on mediaType) to the first cell of each table row. What would be the simplest way to accomplish this?

    --Ville

  2. #2
    Ext User
    Join Date
    May 2008
    Posts
    20
    Vote Rating
    0
      0  

    Default

    col.setRenderer(new CellRenderer()
    {
    public String render(Component item, String property, Object value)
    {
    return"<img src='images/test.jpg'>";
    }

    });

  3. #3
    Ext User
    Join Date
    Jul 2008
    Posts
    60
    Vote Rating
    0
      0  

    Default

    Thank you for the quick reply, it worked!

Posting Permissions

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