I have table called tblA that looks like this
我有一个名为tblA的表,看起来像这样
| FileName | ProductName |
|:-----------|:------------|
| 12345.jpg |Honda |
| 14578.jpg |Toyota |
| 11475.jpg |Honda |
| 11457.jpg |Nissan |
| 11145.jpg |Honda |
| 24879.jpg |BMW |
| 22222.jpg |Honda |
| 21545.jpg |Honda |
| 55552.jpg |Honda |
I am building an ASP.net VB.net website using gridView. If I do this query
我正在使用gridView构建一个ASP.net VB.net网站。如果我这样做查询
select FileName from tblA where ProductName = 'Honda'
Then I want my asp.net gridview to show up like this:
然后我希望我的asp.net gridview显示如下:
|12345.jpg |11475.jpg |11145.jpg |
|22222.jpg |21545.jpg |55552.jpg |
Essentially like craigslist when you select the result to show side by side with pictures.
当你选择与图片并排显示的结果时,基本上就像craigslist。
Can you please give me to the correct direction on how to do this with gridview?
你能否告诉我如何用gridview做正确的方向?
If gridview is not the right approach then do I have to create a loop and build my own DIV HTML in VB.net?
如果gridview不是正确的方法,那么我是否必须创建一个循环并在VB.net中构建我自己的DIV HTML?
thank you
1 个解决方案
#1
0
You have to use DataList control to achieve this and have to use properties RepeatColumns=3, RepeatDirection= RepeatDirection.Horizontal. You may also need to set RepeatLayout property.
您必须使用DataList控件来实现此目的,并且必须使用属性RepeatColumns = 3,RepeatDirection = RepeatDirection.Horizontal。您可能还需要设置RepeatLayout属性。
#1
0
You have to use DataList control to achieve this and have to use properties RepeatColumns=3, RepeatDirection= RepeatDirection.Horizontal. You may also need to set RepeatLayout property.
您必须使用DataList控件来实现此目的,并且必须使用属性RepeatColumns = 3,RepeatDirection = RepeatDirection.Horizontal。您可能还需要设置RepeatLayout属性。