• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1418
  • Last Modified:

force paint whole datagridview?

Hi,

I have code in datagridview1_paint to draw from one cell to another. (from the cell you clicked last, to 0,0)

If I resize the columns, then it redraws the line, but it leaves old lines in the cells that do not get resized. Also, if I click a new cell, then it draws new lines, but the old ones are still visible. How to I force a refresh of the whole thing? I tried ...graphics.clear(white) and that is not the solution.
0
Pizpot
Asked:
Pizpot
1 Solution
 
PaulHewsCommented:
This command causes the grid to fully repaint:

DataGridView1.Invalidate()
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now