datalist custom paging

C

Clint

Hi,

I am trying to implement the custom paging in the datalist in this format:
<< Prev 1,2,3,4,5 Next >>. Does anyone knows how to do this.

Thanks in advance.

Clint
 
J

Janaka

I think your referring to the DataGrid not the DataList? Custom paging is
just what it says it is... custom. You'll have to implement to code to
accomplish your paging. Set the pager to be invisible - i.e. <PagerStyle
Visible="false" />

Have a look at a couple of articles online to try and get your custom paging
solution. A couple I've used myself are
http://www.dotnetjunkies.com/Tutorial/EA868776-D71E-448A-BC23-B64B871F967F.dcik
http://www.4guysfromrolla.com/webtech/082901-1.shtml
http://www.dotnetjunkies.com/Tutorial/07FB766A-35F2-4691-923A-D5F1BA3A12DD.dcik
 
C

Clint Chin

Thanks for the reply. I want to use the DataList to achieve this
because I have a linkbutton on the first row of the datalist control
that when it's clicked, I can hide or show the some of the contents from
a datarow. I saw a posting in google that someone did this with a
datalist, but he didn't post his source codes or how he fixed it.
 
B

Ben Lovell

Hi,

You could handle the ItemCreated event and check if: e.Item.ItemType ==
ListItemType.Pager.

If it is, you are creating the pager controls, here you can inspect and
modify the controls collection using e.Item.Controls property. You can
remove and reinsert these controls and apply any formatting you like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top