根据值调整Datagridview的大小 [英] Resize Datagridview according to the values

查看:62
本文介绍了根据值调整Datagridview的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在面板内部有一个datagridview,我现在填充数据,我希望在数据量较少的情况下显示数据DGV应调整为较少数据和大数据的大小。



查看下面的图片

http://postimg.org/image/ulpa6m4np/ [ ^ ]



我不想显示网格的下面部分。

解决方案

Dock,Anchor,Padding和Margin属性是你的朋友。它们旨在使几乎所有手动调整大小无价值

I have a datagridview inside a panel and i am populating the data now i want to show when less data is there DGV should be resized for less data and for large data also.

check the image below
http://postimg.org/image/ulpa6m4np/[^]

I dont want to show the below part of the grid.

解决方案

The properties Dock, Anchor, Padding and Margin are your friends here. They are designed to make almost all resizing-by-hand worthless


这篇关于根据值调整Datagridview的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆