Multiple Columns on a Datagrid

samsmithnz

Senior Contributor
Joined
Jul 22, 2003
Messages
1,038
Location
Boston
I was wondering if there was a way to use multiple rows on the same line in a datagrid.

In my example I have a very small datagrid, that has only two columns, a name and picture. Currently my results scroll down the page like this:

[name1 picture1]
[name2 picture2]
[name3 picture3]
[name4 picture4]
[name5 picture5]
[name6 picture6]

But I'd like to arrange them into columns like this:

[name1 picture1] [name2 picture2]
[name3 picture3] [name4 picture4]
[name5 picture5] [name6 picture6]

Is there anyway do to this???

Any insight is appreciated.
 
Probably better looking at the DataList control, you would have to define your own ItemTemplate (Label and an Image) but it would then allow you to repeat these in several columns.
 
I'm using itemtemplates anyway, so maybe it won't be so bad. I guess my other alternative is a repeater, but I was just trying to see if there was a simple property that I could select...
 
Back
Top