How do you show x items per row in a repeater?

前端 未结 7 2004
予麋鹿
予麋鹿 2020-12-19 12:49

Anyone have any clue on how to show 4 items going horizontal with a repeater? A repeater shows items going down by default. Here is my test repeater code so far:



        
7条回答
  •  清歌不尽
    2020-12-19 13:30

    
            
                <%# (Container.ItemIndex + 4) % 4 == 0 ? "" : string.Empty %>
                    
                <%# (Container.ItemIndex + 4) % 4 == 3 ? "" : string.Empty %>
            
    ... cell contents omitted ...

    Long live the humble repeater!

提交回复
热议问题