Reputation: 9407
In a WPF and using a DevExpress Grid View I manage to display some data. Now, if there is no data and the list is empty, here is what it looks like:
Every time I add an element it generates a new row. Then at ~ 5 rows (reaches max size) it enables the scroll and users will be able to scroll and see desired row. How can I keep it locked at max size (~ 5 rows) even if my list is empty?
Upvotes: 1
Views: 157
Reputation: 2490
I would suggest figuring out the approximate pixel height of 5 populated rows in your grid control and simply set the MinHeight property on your opening GridControl tag (e.g. <dxg:GridControl MinHeight="250">
) and if you dont want it to grow any larger than that pixel minimum then set a MaxHeight equal to the MinHeight. So <dxg:GridControl MinHeight="250" MaxHeight="250">
.
Upvotes: 1