Skip to main content
Inspiring
August 28, 2013
Answered

Datagrid with graphic cell background problem

  • August 28, 2013
  • 2 replies
  • 904 views

I've got a datagrid and some of the entries belong to a specific "channel." Instead of putting text in the cells to indicate the channel I want to include a logo. I created a custom cell renderer, but I first have to wonder if there is an easier/better way.

In any event the graphic is showing up and it is working like I would expect, except...

For some reason the background of the cell with logo graphic in it is only half height. I have set the row height on the datagrid to 38. The cells in other columns are looking correct. Also if I trace out the height of "this" in the cell renderer class it tells me that it is 38. But clearly somewhere along the route that information isn't getting to the background.

Any ideas?

This topic has been closed for replies.
Correct answer kglad

are you "re-drawing" your datagrid after adding the image?  in particular, if you're loading the image(s), are you using a complete listener to redraw the datagrid?

2 replies

sinious
Legend
August 28, 2013

Are you invalidating on any changes?

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 28, 2013

are you "re-drawing" your datagrid after adding the image?  in particular, if you're loading the image(s), are you using a complete listener to redraw the datagrid?

RothrockAuthor
Inspiring
August 28, 2013

Doh!

I forgot to add super.drawLayout() to my overridden method. Funny how I could miss something so simple.

sinious
Legend
August 28, 2013

We all do the same when you're too close to the code. It's a good excuse for a break .