Horizontal ScrollBar in WinForms DataGridView
Set the AutoSizeMode
of the problematic column to AllCells
.
This will resize the column header and force it to go out of the visible area thus displaying the horizotal scrollbar.
I just had the same issue. I had set the last column to Fill
, so it was always resizing to fit to the visible area.
OneSource
Updated on June 04, 2022Comments
-
OneSource almost 2 years
I'm using a DataGridView in VB.Net in VS 2005. The issue is, when there are rows that exceed the width of the DataGridView, the horizontal scroll bar doesn't appear (the ScrollBars property is set to "Both"), but an ellipsis appears at the end of each row that is too long. I don't want the ellipsis, but the horizontal scroll bar. The vertical scroll bar works as expected when the number of rows exceed the height of the DataGridView. Any ideas on how to resolve this?
I have tried setting numerous related properties (changing the AutoSizing property of the DataGridView, Resizability of the Row Template, made sure that no Columns were Frozen) to no avail.
Thanks!
-
OneSource over 14 yearsThanks Mehmet, that's what I was looking for.
-
Sara almost 7 years@Mehmet Ergut I did what you have said here but I still have the issue and it was not fixed so what can I do in order to fix it