列表视图数据项加载 [英] List View Data Item Loading

查看:86
本文介绍了列表视图数据项加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含不同值的数据读取器.我想在列表视图中插入项目(数据读取器中只有一个值或项目).我希望该值成为另一个值.

即:

a
b
c
d
e

请帮我做这个


Kishore R

I have a datareader containing different values.I want to insert the item(there is only one value or item in data reader) in a list view.i want the value to be come one under another.

ie:

a
b
c
d
e

Kindly help me to do this


Kishore R

推荐答案

1)将ListView的View属性设置为List
2)对要添加的每个项目使用ListView.Items.Add(myItem).
它们将一直位于彼此之间,直到到达列表视图的底部为止,然后将在新列中开始.


1)将ListView的View属性设置为Details
2)插入一列
3)对要添加的每个项目使用ListView.Items.Add(myItem).
它们将一直位于彼此之间,直到到达列表视图的底部,然后才会出现滚动条.
1) Set the View property of your ListView to List
2) Use ListView.Items.Add(myItem) for each item you wish to add.
They will be below each other until they reach the bottom of your listview, then will start in a new column.

or
1) Set the View propertu=y of your ListView to Details
2) Insert a column
3) Use ListView.Items.Add(myItem) for each item you wish to add.
They will be below each other until they reach the bottom of your listview, then a scroll bar will appear.


有关某些方法,请参见
For some ways to do this, see here[^].


这篇关于列表视图数据项加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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