private void AddRow(double val)
{
datagridview.rowcount++;
if (datagridview.rowcount % 2 == 1)
datagridview.rows[datagridview.rowcount-1].defaultcellstyle.backcolor = color.yellow;
}
My next problem is that if i set the currentcell of the datagrid on each update, the update will not be displayed until the following update occurs. For some reason setting the currentcell (to ensure the datagrid shows the latest data) causes the backcolor update to be delayed.
private void AddRow(double val)
{
datagridview.rowcount++;
if (datagridview.rowcount % 2 == 0)
datagridview.rows[datagridview.rowcount-1].defaultcellstyle.backcolor = color.yellow;
datagridview.currentcell = datagridview[0, datagridview.rowcount-1];
}
What am i missing here???

New Topic/Question
Reply




MultiQuote





|