winforms - DataGridView is not painted properly -
i have datagridview in wizard created using tabcontrol. when datagridview shown, mixture of cell contents , previous wizard page displayed. when click next show next wizard page , go previous page, datagridview display correctly. take picture of this:

first cell right in first row corrupted. how can fix this?
edit: can reproduce bug way: place small dgv in form. dgv width 268 , height 247. add 6 columns it. put these lines of code in form load event method:
string[] row = new string[6]; (int = 0; < 10; i++) { row[0] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; row[1] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; row[2] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; row[3] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; row[4] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; row[5] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; datagridview1.rows.add(row); } finally go dgv properties defaultcellstyle , change backcolor transparent. run , thing need scroll right. picture of problem:
http://oi42.tinypic.com/35avtp2.jpg
i think problem transparent color. changing transparent color other transparent solve problem not know why.
thank .. yes related transparent colour , have changed transparent white , dgv works well.
Comments
Post a Comment