固定数据网格中的行数 [英] Fixed number of rows in a datagrid

查看:60
本文介绍了固定数据网格中的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个数据网格,并且绑定数据文件中只有4行,那么

网格将显示4行。但是,在它到达网格底部之前,下面有空白空间

。有没有办法获得固定的

行数,无论绑定表中的数据是什么?


谢谢,

Aaron

-

---

Aaron Smith

删除-1-给我发电子邮件。垃圾邮件很糟糕。

If I have a datagrid and the bound data file only have 4 rows in it, the
grid will show the 4 rows. However, there is blank space below that
until it reaches the bottom of the grid. Is there a way to have a fixed
number of rows regardless of what data is in the bound table?

Thanks,
Aaron
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.

推荐答案




为防止用户添加新行设置

dataset.datatables.defaultview.allownew = false。

http://msdn.microsoft.com/library/de...ownewtopic.asp

Ken

---------------------

" Aaron Smith" <第********** @ smithcentral.net>在消息中写道

新闻:7B ***************** @newssvr16.news.prodigy.co m ...

如果我有一个数据网格,并且绑定数据文件中只有4行,那么

网格将显示4行。但是,在它到达网格底部之前,下面有空白空间

。有没有办法获得固定的

行数,无论绑定表中的数据是什么?


谢谢,

Aaron

-

---

Aaron Smith

删除-1-给我发电子邮件。垃圾邮件糟透了。
Hi,

To prevent the user from adding a new row set the
dataset.datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
---------------------
"Aaron Smith" <th**********@smithcentral.net> wrote in message
news:7B*****************@newssvr16.news.prodigy.co m...
If I have a datagrid and the bound data file only have 4 rows in it, the
grid will show the 4 rows. However, there is blank space below that
until it reaches the bottom of the grid. Is there a way to have a fixed
number of rows regardless of what data is in the bound table?

Thanks,
Aaron
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.





为防止用户添加新行设置

dataset.datatables.defaultview.allownew = false。
http://msdn.microsoft.com/library/de...ownewtopic.asp

Ken

---------------------

" Aaron Smith" <第********** @ smithcentral.net>在消息中写道

新闻:7B ***************** @newssvr16.news.prodigy.co m ...

如果我有一个数据网格,并且绑定数据文件中只有4行,那么

网格将显示4行。但是,在它到达网格底部之前,下面有空白空间

。有没有办法获得固定的

行数,无论绑定表中的数据是什么?


谢谢,

Aaron

-

---

Aaron Smith

删除-1-给我发电子邮件。垃圾邮件糟透了。
Hi,

To prevent the user from adding a new row set the
dataset.datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
---------------------
"Aaron Smith" <th**********@smithcentral.net> wrote in message
news:7B*****************@newssvr16.news.prodigy.co m...
If I have a datagrid and the bound data file only have 4 rows in it, the
grid will show the 4 rows. However, there is blank space below that
until it reaches the bottom of the grid. Is there a way to have a fixed
number of rows regardless of what data is in the bound table?

Thanks,
Aaron
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.


实际上,我不想阻止他们添加新行。我有一个大约6英寸长的

网格,只有3行数据超过

网格窗口的一半是空白的,没有行。我希望整个区域看起来像是网格。我真的不能想出一个解释它的好方法...

如果一个网格在滚动之前最多可以有10行,我想要所有10行

是否存在数据...


Ken Tucker [MVP]写道:
Actually, I don''t want to prevent them from adding a new row. I have a
grid that is about 6 inches long, and with only 3 rows of data more than
half of the grid window is blank with no rows. I want that whole area to
look like the grid. I can''t really think of a good way to explain it...
If a grid can have up to 10 lines before scrolling, I want all 10 lines
to be there whether there is data or not...

Ken Tucker [MVP] wrote:


阻止用户添加新的行集
dataset.datatables.defaultview.allownew = false。

http://msdn.microsoft.com/library/de...ownewtopic.asp

Ken
---------------------
Aaron Smith <第********** @ smithcentral.net>在消息中写道
新闻:7B ***************** @newssvr16.news.prodigy.co m ...
如果我有一个数据网格和绑定数据文件中只有4行,
网格将显示4行。然而,在它下面有空白区域,直到它到达网格的底部。有没有办法获得固定的行数,无论绑定表中的数据是什么?

谢谢,
Aaron
Hi,

To prevent the user from adding a new row set the
dataset.datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
---------------------
"Aaron Smith" <th**********@smithcentral.net> wrote in message
news:7B*****************@newssvr16.news.prodigy.co m...
If I have a datagrid and the bound data file only have 4 rows in it, the
grid will show the 4 rows. However, there is blank space below that
until it reaches the bottom of the grid. Is there a way to have a fixed
number of rows regardless of what data is in the bound table?

Thanks,
Aaron



-

---

Aaron Smith

删除-1-给我发电子邮件。垃圾邮件糟透了。


--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.


这篇关于固定数据网格中的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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