We help IT Professionals succeed at work.

How can I add a watermark behind the cells of a datagridview?

winterhowl
winterhowl asked
on
1,692 Views
Last Modified: 2013-12-17
I tried customizing the backgroundimage property, but it doesn't overlay the image onto the cells themselves.  


        protected override void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds)
        {
            graphics.FillRectangle(new System.Drawing.Drawing2D.LinearGradientBrush(gridBounds, this.BackgroundColor, this.BackgroundColor2, gradientMode), gridBounds);

            if (backgroundImage != null)
            { graphics.DrawImageUnscaled(backgroundImage, gridBounds); }
        }


Comment
Watch Question

Shanmuga SundaramDirector of Software Engineering
CERTIFIED EXPERT

Commented:

Author

Commented:
shasunder: I have seen both of those, but they don't answer my needs.  I need an image to sit behind the cells themselves.  And not just individual cells, but rather across all of them.  One image that covers all visible cells.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Forced accept.

Computer101
EE Admin
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.