473,385 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1397
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 index.htm is loaded, is htmPage1.htm I want...
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 access and don't have permissions, the default page...
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 implement a usability feature that after logging in,...
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 Server. This is the first ASP.NET application...
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. Thanks.
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 called from ASP pages. Can I convert the default...
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 ASP.NET Development Server. I want to config it 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 redirecting the user to the appropriate home page in...
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 started doing this and I have no idea what I did to...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.