Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends, I implemented bootstrap 3 in my website and trying to implement a Datalist which should be responsive. Problem is always showing one column like small screen, even in my desktop screen. That's why i even tried to delete col-sm and col-xs definition, still getting only one column datalist.
Here Datalist control is must, so please don't suggest Listview or other controls. Bootstrap v3.1.1. Thanks to all in advance.

XML
<asp:DataList ID="dlNew" runat="server" CellPadding="5" CellSpacing="5"  HorizontalAlign="Left" RepeatDirection="Horizontal" Height="200px" Caption="Fresh Arrivals" CaptionAlign="Left" EnableViewState="false" RepeatLayout="Flow">
                          <ItemTemplate>
                              <div class="row">
                                  <div class="col-lg-3 col-md-4">
                                      <div style="border: solid 1px #e8e6e6; text-align: center; height: 200px; width: 250px;">
                                          <asp:ImageButton ID="btnImg" runat="server" CommandName="ProductNew" ImageAlign="AbsMiddle" />
                                          <div style="background-color: #e4ddd3; height: 65px; Font-Size: 12px;">
                                              <asp:Label ID="lblT" runat="server"></asp:Label>
                                              <br />
                                              Code:
                                              <asp:Label ID="lblM" runat="server" CssClass="grid_model" Font-Size="12px"></asp:Label>
                                              <br />
                                              <asp:Label ID="lblP" runat="server" Font-Size="14px" Font-Bold="True" ForeColor="#333333"></asp:Label>
                                          </div>
                                      </div>
                          </ItemTemplate>
                      </asp:DataList>
Posted
Updated 3-Jul-17 17:19pm
v2

1 solution

add RepeatColumn=4 to your datalist .it will display 4 column for each row.i hope it will work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900