![datagridvew col header wrap]()
I have data grid view and i want get the above done. I have written the code like below.
For Each col As DataGridViewColumn In dtg.Columns
col.Width = dtg.Width / dtg.Columns.Count
Next
For Each col As DataGridViewColumn In dgv1.Columns
col.DefaultCellStyle.WrapM
ode = DataGridViewTriState.True
Next
dgv1.AutoSizeColumnsMode = DataGridViewAutoSizeColumn
sMode.None
dgv1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMo
de.AllCell
s
It is wrapping some of the columns correctly. but some col, text is getting truncated. screen shot is enclosed.
Request early help to solve this issue.
Our community of experts have been thoroughly vetted for their expertise and industry experience.