Use Color. FromARGB () to obtain the Color when changing the Color of the DataGridView row. This method has three reloads, one of which makes the interface of the DataGridView
An exception is displayed.
Normal (use Color. Green mode and Color. FromArgb (int, int) Mode)
The interface displays an exception after the thread changes the Color of the DataGridView row (in Color. FromArgb (int) mode)
The non-thread mode uses Color. FromArgb (int) mode, and the interface still displays an exception.
Why?The temporary solution is to construct a Color object without using Color. FromArgb (int) in any case.
Main Code:
DataGridView1.Rows [I]. DefaultCellStyle. BackColor = Color. FromArgb (0x7800FF00); // The data list interface displays an exception in this way.
DataGridView1.Rows [I]. DefaultCellStyle. BackColor = Color. FromArgb (120,255,120); // use this method to display the data list interface as expected
// Maid [I]. DefaultCellStyle. BackColor = Color. Green;