Changing paging look

T

TheOne

Hi I would to change way that pages are displayed in web grid. What I would
like to change is if you have many pages it shows page numbers 1,2,3,4,5 and
than there is . to get next listing. I would like to change . with word NEXT
and also ., 6,7,8 with PREVIOUS. Is there easy way to do so? I know I can
write code for custom paging to have my on links for pages and manipulate
them for paging, but is there any other way, easier way?

Thanks,
 
S

Steven Cheng[MSFT]

Hi TheOne,

Thanks for posting here. Regarding on the custom paging question you
mentioned, here are some of my suggestions:

The buildin paging style of the asp.net DataGrid control is limited which
only support Numberic Pagin or
First Next Previous Last style. If we need some further paging UI style,
we may need to provide our own custom paging UI. To do this, we have
several means:

1. Just turn off the buildin paging and host the DataGrid in another html
table, and put our paging UI in that talbe.

2. Create a custom Datagrid class which derived from the ASP.NET DAtagrid,
thus, we can override the datagrid's Render method and inject additional
html which represnet our custom paging UI.

Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
T

TheOne

Thanks for replying. I did option number one. It was easy to do with this
option and I got results that I wanted.

Thanks,
 
S

Steven Cheng[MSFT]

Good !

Also, I think you can consider encapsulating your custom paged datagrid
into a WebServerControl so as to reuse it next time :)

Anyway, thanks again for using MSDN newsgroup.

Best Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top