Image as Column Header in List Grid

Hi!

Can we have an image as column header?

We have a List Grid with column values as paper clip for attachements and we would like to have the same paper clip image for the column header.
Is this possible?

Thanks,
Sanlemo.

Hi sanlemo,
This is easiest to achieve by setting the “icon” property of the ListGridField. Take a look at the documentation for Button.icon for an explanation of how this property should be set. You may want to avoid the normal title for the field showing up next to your icon - to achieve this, you can set ListGridField.getFieldTitle() to a function that simply returns an empty string.
You’ll probably also want to set ListGrid.showSortArrow to “corner” to avoid the sort arrow showing up next to the paperclip image.

Note that for more control over ListGrid column titles you can always override ListGridField.title or ListGridField.getFieldTitle() to return arbitrary HTML.
If you’re taking this approach, we would recommend generating any image HTML using imgHTML() as this generates consistent HTML that should work cross-browser.

Thanks
Isomorphic Software

Perfect! It worked.

Thank you.
Sanlemo

I have tried but could not able to set image in header, please let me know how to display image in the header instead of text.

The instructions are in an earlier post. If you can’t get this working, post what you have so far in a test case.

Thanks!!! Working fine.