I need to set up a windows form DataGridView, programmatically bound to a list, such that only 6 rows are visible to the user (i.e. the grid's height is only 6 cells) and a scroll bar appears when there are more than 6 elements in the bound list. All the rows need to be of the same height. Is there a configuration of properties that does this or do I have to manually set the height of the DataGridView so that only 6 rows would be visible?
views:
118answers:
2
+1
A:
Set the size of the control such that at most 6 rows are visible, and set the Scrollbars property so that the vertical scrollbar appears as needed (to Vertical, or Both if you need a horizontal scrollbar as well).
John at CashCommons
2010-01-21 23:18:33