日期:2014-05-18  浏览次数:20412 次

两行显示一条记录,可以使用gridview控件么?怎么实现?
通过sql文查出的记录是这样
name | age | sex | class | tel
 a1 18 m c1 1111
 a2 18 w c2 2222

要在画面上表示成这种格式

name | age | sex  
class| tel
 a1 18 m  
 c1 1111
 a2 18 w  
 c2 2222  

用gridview能实现么?
如果用Repeater的话,如何取得当前记录索引,设置tr的背景色(如第1,3,5记录背景色黄。第2,4,5记录背景色白)

------解决方案--------------------
用Repeater通过ItemDataBound时间 
e.Item.ItemType == ListItemType.AlternatingItem//奇数行
e.Item.ItemType == ListItemType.Item//偶数行
不过我不知道怎么让Repeater把数据显示成
name ¦ age ¦ sex
class ¦ tel 
楼主知道了请 说下 谢谢