Image as Button in a DataGrid

February 14, 2009

Just as the MouseWheel controlled slider idea, I had this idea when I was working on my flex MP3 player as well. I wanted to give the user the possibility to add tracks to a playlist by clicking a small plus icon in a DataGrid. There are a couple of things that have to be done to achieve this:

  1. Use an itemRenderer to show an Image instead of text
  2. Put the image in button mode so that it can be clicked
  3. Put an event handler on the click or double-click event of the image
  4. Code the event handler

Read more