开发者

How to display all rows in Grdiview without displaying scrollbar

I have gridview with few hundreds rows, how can I force the gridview to extend it's hight and display all ro开发者_StackOverflow中文版ws without scroolbar?

C# 3.0 / .net 3.5 /


The DataGridView has several things which could help you to calculate the height:

  • DisplayedColumnCount
  • DisplayedRowCount - in relation to Rows.Count
  • Rows -> GetRowsHeight()
  • ColumnHeadersHeight
  • RowTemplate - Height

But i would be really interested on which display resolution you display a few hundred rows without scrolling.

Last but not least (nor tested): Take a look into the properties AutoSize and AutoSizeMode


You want display all the handreds rows without scrrolbar. you must change the height of the GridView when you load data.

DataGridView.Height= xxx
Load data
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜