472,353 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 1335
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DaveO | last post by:
Hi All. I have a web with the default startup page as : index.htm that contains an iFrame. The default page, that loads in the iFrame, when...
4
by: Ueslei R. Valentini | last post by:
Hi! I'm using Windows Authentication in my application, restricting permissions with authorization for specific users. But when someone try to...
2
by: paul reed | last post by:
Hi, I use standard form-based authentication. If they haven't logged on yet they get routed to my logon page and all is well. Now, I want to...
2
by: Michael McGuire | last post by:
I have a very strange problem occurring on a couple of servers I have an ASP.NET application written in C# running on IIS 5.0 with Windows 2000...
3
by: news | last post by:
what is the easiest way to redirect the Default.htm (or asp) page to another page? Please show me example as I'm learning how to program asp.net....
3
by: vijay_kerji | last post by:
Dear All, I have a ASP web application running with CS2000. It has Default page as default.asp It also contains .NET ASPX pages, which will be...
2
by: Morgan Cheng | last post by:
Without IIS configuration, is it possible to set "default page" in web.config? I am curious about that because I am developing in VS2005 with...
7
by: Jonathan Wood | last post by:
My site requires all users to log on. Depending on the user's role, they will have access to a certain set of pages. I implemented this by...
1
by: Dennis | last post by:
I have a website in VS 2005. For some reason, when I run it from within VS, it shows the directory listing instead of the default page. It just...
3
by: Cirene | last post by:
When you right click on a page in VS and set it as the "default page" what actually takes place? How does the site know to go here first?
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.