Click here to Skip to main content
15,903,385 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can Anyone explain me..give code for


how to set paging in datalist
Posted
Updated 12-Dec-11 17:24pm
v2
Comments
[no name] 12-Dec-11 23:24pm    
EDIT: removed "pre" tags
RaviRanjanKr 13-Dec-11 13:57pm    
Google Please :)

 
Share this answer
 
v2
Comments
thatraja 13-Dec-11 5:49am    
5!
Monjurul Habib 13-Dec-11 5:53am    
thank you, RAJA
RaviRanjanKr 13-Dec-11 13:58pm    
My 5+
Monjurul Habib 13-Dec-11 14:02pm    
thank you
here is the link for datalist paging example..
paging
DataListPaging
articles
pagingarticles
 
Share this answer
 
Comments
thatraja 13-Dec-11 5:49am    
5!
Code 89 13-Dec-11 6:01am    
@thatraja: thanks:)
RaviRanjanKr 13-Dec-11 13:58pm    
My 5+
Code 89 13-Dec-11 23:44pm    
@Ravi: thank you..
 
Share this answer
 
Comments
thatraja 13-Dec-11 5:49am    
5!
member60 13-Dec-11 7:45am    
Thank you thatraja
RaviRanjanKr 13-Dec-11 13:58pm    
My 5+
Check this article from codeproject: Custom Paging for DataList[^]
 
Share this answer
 
Comments
RaviRanjanKr 13-Dec-11 13:58pm    
My 5!
 
Share this answer
 
Comments
RaviRanjanKr 13-Dec-11 13:58pm    
My 5!
There is one property for datalist allow paging put as True by default it is false.
And set page size(how many rows you want to display)
and finally generate an event
C#
protected void dgList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        dgList.CurrentPageIndex = e.NewPageIndex
        fillist();
    }

fillist() is a method for binding the data to data list.

hope this is useful,
vikranthreddy
 
Share this answer
 
v2
Comments
thatraja 13-Dec-11 5:48am    
Not enough details for OP.
"Allow Paging="true"; used to allow paging
 
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