views:

815

answers:

1

Hello,

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!

A: 

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.

Mehmet Ergut
Thanks Mehmet, that's what I was looking for.
OneSource