Home All Groups Group Topic Archive Search About
Author
28 Feb 2005 4:02 PM
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,

Author
1 Mar 2005 6:57 AM
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.)
Author
1 Mar 2005 1:41 PM
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,

Show quoteHide quote
"Steven Cheng[MSFT]" <v-sch***@online.microsoft.com> wrote in message
news:xFNnsviHFHA.1140@TK2MSFTNGXA02.phx.gbl...
> 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.)
>
>
>
Author
2 Mar 2005 12:50 AM
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.)