Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
13
Answers
C# Painting cells, rows , columns at runtime
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
David Smith
14y
4.6k
1
Reply
Hi i want to be able to Paint cells, rows , and columns at runtime.
right now I have a sample code but its only painting to row 1 row. I want to be able to paint to all.
this is what i have so far. Is there away I can just pick the color from the colordialog box at run time and display to the grid instead
of me assigning the color by code.
if (checkBox1.Checked)
{
dataGridView2.Rows[1].DefaultCellStyle.BackColor = Color.White;
}
else
{
dataGridView2.Rows[1].DefaultCellStyle.BackColor = Color.Red;
}
Post
Reset
Cancel
Answers (
13
)
Next Recommended Forum
Creating dynamic controls, other than in Page_load event in asp.net
Datagridview painting