PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Datagrid horizontal scrollbar not appearing
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Datagrid horizontal scrollbar not appearing
![]() |
Datagrid horizontal scrollbar not appearing |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a fixed size windows Form with a DataGrid docked to the top of
the form. The program allows a user to select from a list of columns to be visible in the DataGrid - so I create a new TableStyle and GridColumnStyles to match at runtime. This works perfectly except that if the column widths exceed the size of the DataGrid no HScrollbar appears. I've seen comments about needing to derive from dataGrid to access the protected scrollbar properties but surely the basic grid should do this - is it a bug, and is there a workaround other than deriving a new control??? brian smith |
|
|
|
#2 |
|
Guest
Posts: n/a
|
OK, fixed it myself. Problem relates to general issues with using
inherited forms. The grid was set to Dock=Fill on the base form, but somehow this meant that the height of the grid on the derived form was actually larger than its container (a tabpage), so the hscrollbars could not be seen. Reverted to undocked mode, setting grid size in form_load. brian smith Brian Smith wrote: > I have a fixed size windows Form with a DataGrid docked to the top of > the form. The program allows a user to select from a list of columns to > be visible in the DataGrid - so I create a new TableStyle and > GridColumnStyles to match at runtime. > > This works perfectly except that if the column widths exceed the size of > the DataGrid no HScrollbar appears. I've seen comments about needing to > derive from dataGrid to access the protected scrollbar properties but > surely the basic grid should do this - is it a bug, and is there a > workaround other than deriving a new control??? > > brian smith |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

