1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    60
    Vote Rating
    0
    villemustonen is on a distinguished road

      0  

    Default Icon as Table Cell Content

    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
    kescatefou is on a distinguished road

      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
    villemustonen is on a distinguished road

      0  

    Default


    Thank you for the quick reply, it worked!

Thread Participants: 1