Horizontal scroll bar NOT appears in DataGridView control in Window application I am using Visual Studio.Net 2005 and working with VB.NET Window application, in one of the window form when I tried to set DataGridView ScrollBars property as ScrollBars.Both then only Vertical scroll bar display in the grid But Horizontal scroll bar not appears in the grid. After doing some analysis I found if DataGridView AutoSizeColumnsMode property is set as DataGridViewAutoSizeColumnsMode.Fill then you will not able to see the horizoltal scroll bar in the grid. SO to see both the scroll bar in the grid make sure you set DataGridView1.AutoSizeColumnsMode = NONE (Default) And DataGridView1.ScrollBars = ScrollBars.Both (Default) |
Wednesday, September 16, 2009
Horizontal scroll bar NOT appears in DataGridView control in Window application
Subscribe to:
Post Comments (Atom)
3 comments:
nice post. thanks.
I also found that if you have a a number of forzen columns (I suspect more columns frozen than are dsiplayed in the grid width by default) you will also lose the horizontal scroll bars.
Build horizontal scrollbar in DataGridView in C# Windows Forms
Post a Comment