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

How to override painting for headers?

Thread ID:

Created:

Updated:

Platform:

Replies:

4794 Jun 2,2003 03:19 AM UTC Jun 2,2003 06:44 PM UTC WinForms 3
loading
Tags: GridControl
Aaron Ching
Asked On June 2, 2003 03:19 AM UTC

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 05:51 AM UTC

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 10:41 AM UTC

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 06:44 PM UTC

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.

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

;