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.
Unfortunately, activation email could not send to your email. Please try again.

tile column header background images

Thread ID:





47427 Aug 4,2006 03:19 AM Aug 4,2006 07:27 AM Windows Forms 1
Tags: Grouping
Asked On August 4, 2006 03:19 AM

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 07:27 AM

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.

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.