如何在数据列表中使用滚动条 [英] how to use scroller in data list

查看:146
本文介绍了如何在数据列表中使用滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我正在使用 DataList 来显示我项目中的所有消息,现在我遇到了一些问题,因为我有很多消息都显示在一个数据列表中并且变得非常大。 :(

所以我想添加滚动控件,以便网页的长度不会变得那么大,我会看到所有的消息所以请指导我怎么能我添加??

hello everybody i am using DataList to showing all the messages in my project and now i have some problem when i have lot of messages all are showing in a single datalist and it become very large. :(
so i want to add scroller control so that the length of the web page does not become so large and i would see all the messages so please guide me how can i add ??

推荐答案

place datalist in div 


<div style=" overflow:scroll; height:100px;">

// datalist here 

</div>


将数据列表放在div中




place datalist in div



<div style="overflow-y:hidden; overflow-x:scroll; removed:relative; width: 50%;">
<asp:datalist id="DataList1" runat="server" onitemcommand="DataList1_ItemCommand" datakeyfield="" xmlns:asp="#unknown">
            <itemtemplate>
               //your items
            </itemtemplate>
        </asp:datalist>
</div>



请看看: http://makhaai.blogspot.in/2011/11/unlimited-scroll-in-aspnet-datalist.html [ ^ ]


这篇关于如何在数据列表中使用滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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