如何使用Listview控件? [英] How to use Listview control?

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

问题描述

HI,
我正在使用3.5中的C#语言在.net中进行项目.
我有一个要显示在
中存储的产品详细信息的要求 sql Server以及图像路径存储在数据库中的图像.
主要问题是?
1.我的产品是否可以移动?然后它应该显示所有详细信息和所有手机型号以及图像.用户必须能够查看手机下的所有产品
类别.
如果我使用gridview,那么我能看到表格详细信息中给出其路径的图像吗?
请帮帮我吗?

我的项目中使用的表格:


I am doing a project in .net using c# language in 3.5.
I have a requirement in which i want to display the products details stored in
the sql Server along with the images whose imagepath is stored in the database.
The main question is?
1. If my product is mobile? Then it should display all the details and all the mobiles model along with images.User must be able to see all the products under mobile
category.
If i use gridview then could i be able to see the images whose path is given in the table details?
Please help me with it?

table used in my project:

1. category(c_id int primary key, c_name varchar(50));
2. subcategory(sc_id int primary key, c_id int references category(c_id), sc_name varchr(50));
3. details(d_id int primary key,sc_id int references subcategory(sc_id), d_name varchar(50), d_price varchar(10), d_discount varchar(10), d_imagepath varchar(100));


如果我使用列表视图控件,那我应该如何使用它呢?


If i use List view control then how should i use it?

Will be waiting for your reply?

推荐答案

您必须使用listview还是gridview可以吗?如果有选择,对于不同类型的多个列,我将使用gridview.看到这里:

http://www.codeproject.com/Messages/3895927/ListView.aspx [ ^ ]
Must you use listview or is gridview ok? If given the choice, for multiple columns of different types, I would use gridview. See here:

http://www.codeproject.com/Messages/3895927/ListView.aspx[^]


我会建议您改为使用Gridview控件,
这是带有详细说明的Listview控件的链接.
http://msdn.microsoft.com/en-us/library/bb398790.aspx [ ^ ]
I would suggest you to go for Gridview Control instead,
Here is the link to your Listview control with detail explanation.
http://msdn.microsoft.com/en-us/library/bb398790.aspx[^]


您必须定义"ImageList"以将其与List视图一起使用:
然后将列表视图中的每个项目与其图片链接...

您可以使用已随VS软件包安装的MSDN帮助:D
照顾我的朋友
you must define an "ImageList" to use it with the List view:
then link each item in the list view with it''s picture...

you may use MSDN help thats already installed with VS package :D
take care my freind


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

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