ListView控件问题 [英] ListView control issue

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

问题描述




listview中的最大列数是否有限制

控制?我发现:


在listview控件(报告格式)中,我显示了一个包含400个字段的

记录。我正在动态创建其列名

(Field-1,Field-2 ...)。在Field-362之后我发现了什么

,列名只是空白但在

数据行文本正在正常显示到400th

领域。这是XP环境中的场景。


在Win-98环境中,直到有362个字段的记录显示,但是如果记录包含的内容超过

这个数字,没有数据显示。


代码不会抛出任何错误。


问候


Vinay

Hi,

Is there a limit on maximum number of columns in listview
control ? I am finding:

In a listview control (Report Format) I am displaying a
record with 400 fields. I am creating its column names
dynamically (Field-1, Field-2 ...). What I am finding
after Field-362, column names are just blank but in the
data row text is being displayed properly till 400th
field. This is the scenario in XP environment.

In Win-98 environment till records having 362 fields are
getting displayed, but if a record contains more than
this number, no data is being displayed.

The code is NOT throwing any error.

Regards

Vinay

推荐答案

*" Vinay" <铜**** @ cursor.com> scripsit:
* "Vinay" <cu****@cursor.com> scripsit:
listview
控件中的最大列数是否有限制?我发现:

在listview控件(报表格式)中,我显示了一个包含400个字段的
记录。我正在动态创建它的列名(Field-1,Field-2 ......)。在Field-362之后我发现了什么,列名只是空白但在
数据行中文本正在正确显示到400th
字段。这是XP环境中的场景。

在Win-98环境中,直到有362个字段的记录显示,但如果记录包含的数量超过这个数字,则没有数据正在显示。
Is there a limit on maximum number of columns in listview
control ? I am finding:

In a listview control (Report Format) I am displaying a
record with 400 fields. I am creating its column names
dynamically (Field-1, Field-2 ...). What I am finding
after Field-362, column names are just blank but in the
data row text is being displayed properly till 400th
field. This is the scenario in XP environment.

In Win-98 environment till records having 362 fields are
getting displayed, but if a record contains more than
this number, no data is being displayed.




我没有找到任何有关此类限制的信息。你有没有看到应用程序的内存使用情况?


-

Herfried K. Wagner
MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>



I didn''t find any information about a limitation like this. Did you
have a look at the memory usage of the application?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


嗨Herfried,


感谢您的回复。


能否详细说明一下内存使用情况(我应该检查一下

...)。从外面我找不到任何

标志,应用程序正在寻找更多内存(我可能

是错误的。)


问候


Vinay
Hi Herfried,

Thanks for your reply.

Can you please elaborate about the memory usage (what
should I check ...). From the outside I don''t find any
sign that application is looking for more memory (I may
be wrong.)

Regards

Vinay
我没有找到任何关于限制的信息,比如
这个。您是否看过应用程序的内存使用情况?

- Herfried K. Wagner
MVP·VB Classic,VB.NET
< http: //www.mvps.org/dotnet>
I didn''t find any information about a limitation like this. Did youhave a look at the memory usage of the application?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
.



*" Vinay" <铜**** @ cursor.com> scripsit:
* "Vinay" <cu****@cursor.com> scripsit:
感谢您的回复。

请您详细说明内存使用情况(我应该检查什么......)。从外面我没有找到任何
标志,应用程序正在寻找更多的内存(我可能会错。)
Thanks for your reply.

Can you please elaborate about the memory usage (what
should I check ...). From the outside I don''t find any
sign that application is looking for more memory (I may
be wrong.)




它只是一个想法。

添加400列时,应用程序可能存在内存问题。您可以使用任务

manager检查内存使用情况。但是,正如你所提到的,如果内存有任何问题,我会期待一个例外。


你在列表视图中添加了多少行?当您使用此代码添加列标题时,是否会出现问题




\\\

Dim我作为整数

对于i = 1到400

下一页我是

Me.ListView1.View = View.Details

///


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps。 org / dotnet>



It was only an idea. Maybe the application has memory problems when
adding 400 columns. You can check the memory usage with the task
manager. But, as you mentioned, I would expect an exception if there
are any problems with memory.

How many rows are you adding to the listview? Does the problem even
occur when you use this code to add column headers?

\\\
Dim i As Integer
For i = 1 To 400
Me.ListView1.Columns.Add("Column " & i.ToString(), 10, HorizontalAlignment.Left)
Next i
Me.ListView1.View = View.Details
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


这篇关于ListView控件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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