如何在C#和Bootstrap框架中创建响应式DataList [英] How do I create a responsive DataList in C# and Bootstrap framework

查看:221
本文介绍了如何在C#和Bootstrap框架中创建响应式DataList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,我在我的网站上实现了bootstrap 3并试图实现一个应该响应的Datalist。即使在我的桌面屏幕上,问题总是显示一个列,如小屏幕。这就是为什么我甚至试图删除col-sm和col-xs定义,仍然只获得一个列数据列表。

这里必须使用Datalist控件,所以请不要建议Listview或其他控件。 Bootstrap v3.1.1。提前全部感谢。



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.

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

推荐答案

RepeatColumn = 4 添加到您的datalist .it将显示4列r每行。我希望它能起作用。
add RepeatColumn=4 to your datalist .it will display 4 column for each row.i hope it will work.


这篇关于如何在C#和Bootstrap框架中创建响应式DataList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆