Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / December 2006

Tip: Looking for answers? Try searching our database.

Relationship between DataGridView.CellPainting event and DataGridViewCell.Paint

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RJ - 11 Dec 2006 15:54 GMT
Can someone explain how DataGridView.CellPainting event and
DataGridViewCell.Paint are related?  I've read how to add an event handler
method to a Form class, which will allow some customization of the
appearance of individual DataGridView cells.
I've also read how to override the Paint method of a class inheriting from
DataGridViewCell, to customize the appearance of individual cells.

I'm not understanding the difference in these 2 approaches.  Can someone
briefly explain the sequence of "events" in which these methods get called,
and how they are related?

Thanks for any input.
J
Kevin Spencer - 11 Dec 2006 18:19 GMT
You can handle the DataGriedView.CellPainting event to customize the
painting of every cell, or any group of cells, as it fires for every cell.
The DataGridViewCell.Paint event is fired by the individual cell.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

Expect the unaccepted.

> Can someone explain how DataGridView.CellPainting event and
> DataGridViewCell.Paint are related?  I've read how to add an event handler
[quoted text clipped - 9 lines]
> Thanks for any input.
> J

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.