Click here to Skip to main content
15,895,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 ??
Posted
Updated 8-Feb-13 18:15pm
v2

place datalist in div 


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

// datalist here 

</div>
 
Share this answer
 
v2
place datalist in div


 
Share this answer
 
ASP.NET
<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>

Please also do have a look : http://makhaai.blogspot.in/2011/11/unlimited-scroll-in-aspnet-datalist.html[^]
 
Share this answer
 
v2
Comments
[no name] 16-Feb-13 8:08am    
thanks for your suggestion i solved it by simply using panel and set its scroll bar as auto
and just put the datalist in the panel;

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