开发者

SQL query in tables side by side instead of one long table

I have ajax ReorderList in my wep page,and I get the data from SQL Server. I would like to add table cells dynamically according to number of records 开发者_运维知识库and show the result side by side until for example I have five data in a row and then move to the next row,

any idea?

Thanks in advance


Use a DataList control, and set the Horizontal layout to the desired number of cells using the RepeatColumns and RepeatDirection properties.

<asp:DataList id="myDataList" runat="server" 
      RepeatColumns="5" RepeatDirection ="Horizontal" 
      DataSourceID="MySqlDataSource" DataKeyField="SqlKeyFieldName">
  <ItemTemplate>
    <%# Eval("SqlFieldName") %>
  </ItemTemplate>
</asp:DataList>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜