Hi
Can you let me know how to always display vertical scrollbar in a datagridview?
My datagridview is being updated by a script which returns an array.
My gui has a border on the datagridview so there is not just dead space there before it gets populated.
If my results arrray has more that 5 lines, I have a scrollbar and it fills the border nicely, all is well.
Any less than 5 rows and it leaves empty space where the vertical scrollbar normally lives.
The 'fill' control in the designer doesnt help me as it is just splitting my 3 column datagridview into equal sized columns and my data gets truncated.
I have found this in a C# forum but I can't see a corresponding option in designer or get the intellisense to give me a similar option in the script editor? : -
Try setting ScrollViewer.VerticalScrollBarVisibility="True" That property is set to Auto by default.
thanks in advance
DataGridView - Vertical Scroll Always Visible?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 55
- Last visit: Thu Jun 24, 2021 3:05 am
Re: DataGridView - Vertical Scroll Always Visible?
Sorry but there is no way to do what you ask with the WinForms DataGridView control. The property you reference does not exist on this control or in WinForms. It is only available in WPF forms.
-
- Posts: 55
- Last visit: Thu Jun 24, 2021 3:05 am