1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    7
    Vote Rating
    0
    pvuppala is on a distinguished road

      0  

    Default Unanswered: Adding an Image

    Unanswered: Adding an Image


    Hi,
    I want to add an image(say delete) at the beginning of each row. How can we do this using GXT.

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Answers
    20
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    Do you mean in a GXT grid?

    You can use a GWT ImageCell or ImageResourceCell. Take a look at the Cell Grid example here: http://www.sencha.com/examples/#ExamplePlace:cellgrid for how to add widgets to grids.

    Then just add it as the first column.

    That said, it sounds like you want to respond to click events (since you say "delete"). If this is the case, you will probably want to use a ButtonCell instead with no text and just your ImageResource. I've not tried to use a ButtonCell with just an image so I don't know off the top of my head if this works.
    Last edited by icfantv; 23 Aug 2013 at 7:22 AM. Reason: for clarity

Thread Participants: 1