and later in the code, this datagridview gets populated with data. when the cell gets populated with data, the cell will change color. when there is no data for the cell, it will revert back to the previous color.
the problem i am facing is there are 1000 rows in this datagridview, and when i change the color on some of the cells (reverting the color back) it seems to be painting the whole datagridview every time...i can see the whole datagridview flicker when it updates.
so my question is:
how can i JUST paint the individual cell and not the whole datagridview when one cell changes color?
You could try do set DoubleBuffered true for your dataGridView, but since it's a protected property you have derive from datagridview and use the derived datagridview.
public class CustomDataGridView : DataGridView
{
public CustomDataGridView() : base()
{
base.DoubleBuffered = true;
}
}
This will reduce flickering a lot, but it's not answering your question since the whole visible datagridview still updates (noticeable on slow systems).
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
public class CustomDataGridView : DataGridView
{
public CustomDataGridView() : base()
{
base.DoubleBuffered = true;
}
}
This will reduce flickering a lot, but it's not answering your question since the whole visible datagridview still updates (noticeable on slow systems).