469,946 Members | 2,120 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

Default paging, how to show text "page nr.:"

Dear sir,

I am using the default paging function of datagrid. Below is my code.

<PagerStyle NextPageText="&gt;&gt;&gt;" PrevPageText="&lt;&lt;&lt;"
HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>

It works fine, it show a 1 2 3 4 5 page nr. at the bottom of datagrid.

However, what I want is that before 1 2 3 4 5, I would like to show a text
saying "page nr.:" So it should be:

........
Page nr.: 1 2 3 4 5

I think it will be clearer for peope to know that it is a page nr.

How should I achieve this????

Thanks.

Guoqi Zheng
http://www.meetholland.com
Nov 18 '05 #1
2 1249
Hi Guoqi,

Try this?

Private Sub DataGrid1_ItemCreated _
(ByVal sender As Object, ByVal e As _
DataGridItemEventArgs) Handles DataGrid1.ItemCreated
If e.Item.ItemType = ListItemType.Pager Then
Dim pagerCell As TableCell
pagerCell = CType(e.Item.Controls(0), TableCell)
Dim pageOf As String = _
"Page nr.: "
pagerCell.Controls.AddAt(0, _
New LiteralControl(pageOf))
End If
End Sub

Ken
Microsoft MVP [ASP.NET]

"Guoqi zheng" <no@sorry.nl> wrote in message
news:uB*************@TK2MSFTNGP12.phx.gbl...
Dear sir,

I am using the default paging function of datagrid. Below is my code.

<PagerStyle NextPageText="&gt;&gt;&gt;" PrevPageText="&lt;&lt;&lt;"
HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>

It works fine, it show a 1 2 3 4 5 page nr. at the bottom of datagrid.

However, what I want is that before 1 2 3 4 5, I would like to show a text
saying "page nr.:" So it should be:

.......
Page nr.: 1 2 3 4 5

I think it will be clearer for peope to know that it is a page nr.

How should I achieve this????

Thanks.

Guoqi Zheng
http://www.meetholland.com


Nov 18 '05 #2
Super.

Thank you very much.

Gr.
Guoqi Zheng
http://www.meetholland.com

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Hi Guoqi,

Try this?

Private Sub DataGrid1_ItemCreated _
(ByVal sender As Object, ByVal e As _
DataGridItemEventArgs) Handles DataGrid1.ItemCreated
If e.Item.ItemType = ListItemType.Pager Then
Dim pagerCell As TableCell
pagerCell = CType(e.Item.Controls(0), TableCell)
Dim pageOf As String = _
"Page nr.: "
pagerCell.Controls.AddAt(0, _
New LiteralControl(pageOf))
End If
End Sub

Ken
Microsoft MVP [ASP.NET]

"Guoqi zheng" <no@sorry.nl> wrote in message
news:uB*************@TK2MSFTNGP12.phx.gbl...
Dear sir,

I am using the default paging function of datagrid. Below is my code.

<PagerStyle NextPageText="&gt;&gt;&gt;" PrevPageText="&lt;&lt;&lt;"
HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>

It works fine, it show a 1 2 3 4 5 page nr. at the bottom of datagrid.

However, what I want is that before 1 2 3 4 5, I would like to show a text saying "page nr.:" So it should be:

.......
Page nr.: 1 2 3 4 5

I think it will be clearer for peope to know that it is a page nr.

How should I achieve this????

Thanks.

Guoqi Zheng
http://www.meetholland.com

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by DaveO | last post: by
4 posts views Thread by Ueslei R. Valentini | last post: by
2 posts views Thread by paul reed | last post: by
2 posts views Thread by Michael McGuire | last post: by
3 posts views Thread by news | last post: by
3 posts views Thread by vijay_kerji | last post: by
2 posts views Thread by Morgan Cheng | last post: by
7 posts views Thread by Jonathan Wood | last post: by
3 posts views Thread by Cirene | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.