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.

How to override painting for headers?

Thread ID:

Created:

Updated:

Platform:

Replies:

4794 Jun 1,2003 11:19 PM Jun 2,2003 02:44 PM Windows Forms 3
loading
Tags: GridControl
Aaron Ching
Asked On June 1, 2003 11:19 PM

Hi, What is the way to override painting for the headers, including my own drawings of the background and the interior? Here are my codes: protected override void OnDrawCell(GridDrawCellEventArgs e) { if (e.RowIndex == 0) { MyDrawBackgroundMethod(...); MyDrawInteriorMethod(...); } else { base.OnDrawCell(e); } } This is ok for RowIndex > 0 but not for the header cells. I have already set this.BaseStyleMap["Header"].StyleInfo.CellType = "Static". What else should I do to take over the header painting? Thanks for helping again. Aaron

Administrator [Syncfusion]
Replied On June 2, 2003 01:51 AM

After doing your header drawing, set e.Cancel = true to tell the grid not to continue with its default drawing.

Administrator [Syncfusion]
Replied On June 2, 2003 06:41 AM

FYI - In 1.6 there is also a new DrawCellBackground event that should also help with this. Stefan

Aaron Ching
Replied On June 2, 2003 02:44 PM

Thanks for both your comments. 1.6 is still not available in the download. Is there an ETA? We can't wait to get our hands on it. Thanks again guys.

CONFIRMATION

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.

;