Dear ASP.NET Programmers,
I am using the datagrid control (grdSPs) to display database data. The
datagrid allows paging. What I am trying to do is to insert row numbers
automatically. I can do this, but with every consequent page, the index
starts again from 1. How can I make it to continue from the row number on
the previous page?
Thanks in advance,
Buran 2 6200
maybe u should do this at datalevel
there arse some ways i gues u gould do this with dataset events
"buran" <bu***@buran.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl... Dear ASP.NET Programmers, I am using the datagrid control (grdSPs) to display database data. The datagrid allows paging. What I am trying to do is to insert row numbers automatically. I can do this, but with every consequent page, the index starts again from 1. How can I make it to continue from the row number on the previous page?
Thanks in advance, Buran
Check out this code, which will do the work which you wanted
<asp:datagrid id="DataGrid1" runat="server" AllowSorting="True"
AllowCustomPaging="True" AllowPaging="True" PagerStyle-Mode="NumericPages"
PageSize="10" PagerStyle-NextPageText="next" PagerStyle-PrevPageText="Prev"
<Columns>
<asp:templatecolumn headertext="Row Number">
<itemtemplate>
<%# DataGrid1.PageSize*DataGrid1.currentPageindex + Container.ItemIndex+1
%>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.
"buran" <bu***@buran.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl... Dear ASP.NET Programmers, I am using the datagrid control (grdSPs) to display database data. The datagrid allows paging. What I am trying to do is to insert row numbers automatically. I can do this, but with every consequent page, the index starts again from 1. How can I make it to continue from the row number on the previous page?
Thanks in advance, Buran
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wayne Aprato |
last post by:
I have a report that shows the results of a query. One of the fields
is an autonumber field from the query which shows for instance: 120,
121 , 122 for 3 records. Is there a way to have another...
|
by: Prakash |
last post by:
Hi !
I have a field "sub_tran_no" in my form in continuous view.
When the user presses a button "Re-Number", I'd like to:
1) Save the current record pointer position
2) Save the current...
|
by: Diego TERCERO |
last post by:
Hi...
I'm working on a tool for editing text resources for a family of software
product my company produces.
These text resources are found in a SQL Server database, in a table called...
|
by: BBFrost |
last post by:
Win2000
..Net 1.1 SP1
c# using Visual Studio
Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1
datagrid.
I've come to realize that a 'block' of rows highlighted within...
|
by: Carolyn Vo |
last post by:
I have a datagrid in my web control class that I am trying to get the current
rows displayed for. I have enabled paging on the datagrid so if the user is
currently on page 3 of 8, and if I have...
|
by: buran |
last post by:
Dear ASP.NET Users,
How can I get the total number of rows selected by the command text of the
datagrid (items in datagrid)? If I use the statement grdSP.Items.Count with
the datagrid grdSP with...
|
by: Jim Heavey |
last post by:
Trying to figure out the technique which should be used
to add rows to a datagrid. I am thinking that I would
want an "Add" button on the footer, but I am not quite
sure how to do that. Is that...
|
by: Tim Newton |
last post by:
Hi
Anyone tell me how to number the rowheaders of a datagrid, e.g. 1,2,3,4,5
etc, just like in excel. I could put the row numbers in a new column but
there has to be a simple way of adding it to...
|
by: saraDotNet |
last post by:
Hi,
I'v Two Questions:
1-Is there a way to make an auto numbering avalible in vb.net form textbox as the one in Access db columns when we set the datatype as autonumbering??
2-
I'm working on a...
|
by: rn5a |
last post by:
All the rows in a DataGrid are accompanied by a CheckBox. When a user
checks the rows & clicks a Button, the checked rows get deleted. For
e.g. assume that the DataGrid displays 10 rows. A user...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |