views:

30

answers:

1

hi there,

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

+1  A: 

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>
womp