amir amir - 1 year ago 131
C# Question

how to Use BMP image file for background of winform in c#

I have winform and i use image.BMP for background of my form and when i run it This happened :

enter image description here

It is working but my problem is background of datagridview
I don't want to see the behind the datagridview
How can i run that form with showing datagridview normally?

mww mww
Answer Source

You need to use loop and change color of each cell. Do it after set datasource.

foreach (DataGridViewRow row in yourDataGridView.Rows) 
         row.DefaultCellStyle.BackColor = Color.White; 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download