在VB.NET中,我们可以在数据网格不存在的行中绘制空行而不是空白区域吗? [英] In VB.NET, can we draw empty lines instead of blank area in non existent row of datagrid?

查看:61
本文介绍了在VB.NET中,我们可以在数据网格不存在的行中绘制空行而不是空白区域吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:
我想我们可以使用这篇文章来绘制类似于网格的图像:



或者您也可以在要设置DGV的任何数据源中添加多余的空白行。



使用ScrollBars属性关闭垂直滚动条。

p>

EDITED: I think we can just draw an image that resemble the grid using this article : drawing in a datagridview Currently creating a way to make the image drawn in tile mode. :)

Each time I develop a datacentric application using VB.NET regardless of how much the data displayed in the datagrid, I always want the grid to display full row of empty data, not just blank panel.

Can we achieve this using VB.NET design time property?

And also, we must not trigger the display of vertical scrollbar this way.. :) Thanks

解决方案

You might try doing a screen capture of the dgv when it is full of blank lines and use that as your background. However, you'll have a problem with the vertical lines if they resize the columns. In your picture you don't have any vertical lines so if you don't need them then just erase them and your problem is solved.

There's also the option of using the Virtual Mode. When you set that property to true then you can set the number of visible rows, but you are responsible for telling the dgv what each individual cell is supposed to contain: http://msdn.microsoft.com/en-us/library/2b177d6d.aspx

Or you can just add extra blank rows to whatever datasource you are setting your DGV to.

Use the ScrollBars property to turn the vertical scroll bar off.

这篇关于在VB.NET中,我们可以在数据网格不存在的行中绘制空行而不是空白区域吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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