开发者

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

开发者 https://www.devze.com 2022-12-15 19:03 出处:网络
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

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

精彩评论

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