We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

tile column header background images

Thread ID:





47427 Aug 4,2006 07:19 AM UTC Aug 4,2006 11:27 AM UTC WinForms 1
Tags: Grouping
Asked On August 4, 2006 07:19 AM UTC

I am working with a GridGroupingControl of the current version. The enclosed images show what I try to achieve and what I currently have.

How can I tile background images for column headers? GridBackgroundImageMode only allows me to stretch or center the image.

Thanks for your help.


Administrator [Syncfusion]
Replied On August 4, 2006 11:27 AM UTC

Hi Mario,

There is no built-in support for this. You can use the TableControlDrawCell event to customize the images that appear in the ColumnHeader cell in a gris. Here is a code snippet:

GridTableCellStyleInfo info = e.Inner.Style as GridTableCellStyleInfo;
if( info.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell )
e.Inner.Cancel = true;
Image image = "Your Image: //////SystemIcons.Exclamation.ToBitmap();
TextureBrush tBrush = new TextureBrush(image);
Pen blackPen = new Pen(Color.Black);
e.Inner .Graphics.FillRectangle(tBrush, e.Inner.Bounds );
e.Inner.Graphics.DrawRectangle(blackPen, e.Inner.Bounds );
//If you want to show the Header Text cleary ..... try use the DrawString method.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon