473,581 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 DataGrids & Paging

In a shopping cart app, a ASPX page retrieves the order details &
personal details of a user from a MS-Access database table depending
upon the username of the user.

The order details of a particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another
DataGrid. Note that both the DataGrids reside in the same ASPX page.

Users can also place multiple orders. Under such circumstances, I want
to provide paging capability to the ASPX page that displays the 2
DataGrids. Assume that I have placed 5 orders & currently I am viewing
my 1st order. The 1st DataGrid displays the order details of my 1st
order & the 2nd DataGrid displays personal details corresponding to my
1st order. When I click the 2nd paging link, the 1st DataGrid should
display the order details of my 2nd order & the 2nd DataGrid should
display the personal details corresponding to my 2nd order.

The problem is if I provide paging in the 1st DataGrid & then click
the 2nd paging link to view my 2nd order & personal details, then the
1st DataGrid will correctly display the order details of my 2nd order
but the 2nd DataGrid will not correctly display the personal details
corresponding to my 2nd order.

The situation just reverses if I provide paging in the 2nd DataGrid
i.e. while viewing the details of my 1st order, if I click the 2nd
paging link to v;iew my 2nd order & personal details, then the 2nd
DataGrid will display the personal details of my 2nd order correctly
but the 1st DataGrid will not correctly display the order details
corresponding to my 2nd order.

What do I do in such a scenario?

Of course, I can do the paging manually but that would involve adding
a lot of extra code. I won't be able to use the in-built paging
feature of the DataGrid as well.

Please note that I would like to display the order details & personal
details in 2 different DataGrids only.

Apr 13 '07 #1
2 1920
Hi,
I guess you are using ASP.NET 1.1.
Since you have two grids with same number of records, it won't be difficult.
You can apply paging on 1st or 2nd or both the datagrids.
When ever a user clicks on page number a event is generated. Handle that
event. From there you'll get the NewPageIndex of the datagrid, set the same
index for the second grid also.

I hope this solves your problem. In case of any difficulty or problem feel
free to write back to me.

"rn**@rediffmai l.com" wrote:
In a shopping cart app, a ASPX page retrieves the order details &
personal details of a user from a MS-Access database table depending
upon the username of the user.

The order details of a particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another
DataGrid. Note that both the DataGrids reside in the same ASPX page.

Users can also place multiple orders. Under such circumstances, I want
to provide paging capability to the ASPX page that displays the 2
DataGrids. Assume that I have placed 5 orders & currently I am viewing
my 1st order. The 1st DataGrid displays the order details of my 1st
order & the 2nd DataGrid displays personal details corresponding to my
1st order. When I click the 2nd paging link, the 1st DataGrid should
display the order details of my 2nd order & the 2nd DataGrid should
display the personal details corresponding to my 2nd order.

The problem is if I provide paging in the 1st DataGrid & then click
the 2nd paging link to view my 2nd order & personal details, then the
1st DataGrid will correctly display the order details of my 2nd order
but the 2nd DataGrid will not correctly display the personal details
corresponding to my 2nd order.

The situation just reverses if I provide paging in the 2nd DataGrid
i.e. while viewing the details of my 1st order, if I click the 2nd
paging link to v;iew my 2nd order & personal details, then the 2nd
DataGrid will display the personal details of my 2nd order correctly
but the 1st DataGrid will not correctly display the order details
corresponding to my 2nd order.

What do I do in such a scenario?

Of course, I can do the paging manually but that would involve adding
a lot of extra code. I won't be able to use the in-built paging
feature of the DataGrid as well.

Please note that I would like to display the order details & personal
details in 2 different DataGrids only.

Apr 15 '07 #2
On Apr 15, 9:52 am, Tushar <Tus...@discuss ions.microsoft. comwrote:
Hi,
I guess you are using ASP.NET 1.1.
Since you have two grids with same number of records, it won't be difficult.
You can apply paging on 1st or 2nd or both the datagrids.
When ever a user clicks on page number a event is generated. Handle that
event. From there you'll get the NewPageIndex of the datagrid, set the same
index for the second grid also.

I hope this solves your problem. In case of any difficulty or problem feel
free to write back to me.

"r...@rediffmai l.com" wrote:
In a shopping cart app, a ASPX page retrieves the order details &
personal details of a user from a MS-Access database table depending
upon the username of the user.
The order details of a particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another
DataGrid. Note that both the DataGrids reside in the same ASPX page.
Users can also place multiple orders. Under such circumstances, I want
to provide paging capability to the ASPX page that displays the 2
DataGrids. Assume that I have placed 5 orders & currently I am viewing
my 1st order. The 1st DataGrid displays the order details of my 1st
order & the 2nd DataGrid displays personal details corresponding to my
1st order. When I click the 2nd paging link, the 1st DataGrid should
display the order details of my 2nd order & the 2nd DataGrid should
display the personal details corresponding to my 2nd order.
The problem is if I provide paging in the 1st DataGrid & then click
the 2nd paging link to view my 2nd order & personal details, then the
1st DataGrid will correctly display the order details of my 2nd order
but the 2nd DataGrid will not correctly display the personal details
corresponding to my 2nd order.
The situation just reverses if I provide paging in the 2nd DataGrid
i.e. while viewing the details of my 1st order, if I click the 2nd
paging link to v;iew my 2nd order & personal details, then the 2nd
DataGrid will display the personal details of my 2nd order correctly
but the 1st DataGrid will not correctly display the order details
corresponding to my 2nd order.
What do I do in such a scenario?
Of course, I can do the paging manually but that would involve adding
a lot of extra code. I won't be able to use the in-built paging
feature of the DataGrid as well.
Please note that I would like to display the order details & personal
details in 2 different DataGrids only.- Hide quoted text -

- Show quoted text -
Thanks Tushar for the idea. Actually I was supposed to use 2 DataGrids
but since I want the 2nd DataGrid to display records row-wise & not
column-wise (have a look at how I want to display the records at
http://rn5a.brinkster.net/Page1.aspx), I had to replace the 2nd
DataGrid with a DetailsView.

Any idea how do I go about paging under such circumstances?

Apr 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5225
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is developing a web-based application, one part of which involves allowing the user the ability to page through transaction "history" information. The...
2
3923
by: ByB | last post by:
Hello, I have a problem in C# with a datagrid i use with paging. With the paging I can display 10 items in one page. Those items can be deleted separately. When i delete one of them, i update the datatable used as datasource and I redo a DataBind() for the datagrid. If i have 11 items to display, the 11th item is displayed in the 2nd
2
1310
by: Gavin | last post by:
Hi, I am trying to get a list of all of the rows in a datagrid where a checkbox is checked but am having a major headache with the postback. I'm using VB and codebehind and I have an example which works fine as long as I don't repopulate the datagrid. Unfortunately I need to repopulate the datagrid to get the paging and sorting to work. ...
0
1180
by: Jos Walrave | last post by:
I want to create an ASP.NET web application using C#. Purpose of the web application is access to a MS SQL Server database. Some of our customers are using large databases, so the application should be able to handle large datasets in a proper and user-friendly way. I want to use a DataGrid. I also want to use the option Custom Paging. I...
9
3000
by: | last post by:
I have a web page written in asp.net that has multiple datagrids on it that would need to be exported to Excel. Each of the datagrids would be a subset of what the datagrid above it was. Thus far, I've had no luck in finding anything to work reliably. Some of the files I've saved (using a radio button click event), will open fine in...
0
952
by: Shock | last post by:
Hello all, I work for a small programming shop and we have recently been developing web reports using aspx datagrids. On productions machines everything works fine, but when we move the content out to the web server it becomes very flaky. The problem is around the datagrid itself. The paging features seem very flaky. Sometimes the pages...
1
1099
by: Craig G | last post by:
Hi, ive been using the following link :- http://www.dotnetjohn.com/articles.aspx?articleid=21 but i noticed in the code that it only brought back the top 10 records. when i removed this and brought back all records and added paging via the property builder i got the following error ...
4
1062
by: Helen Trim | last post by:
I have a datagrid on a webform that will allow the user to edit data in a list. I have added the edit column in as a link, but when it is clicked nothing happens. Do I need to set something else in the Columns property or is it a property of the dataset that needs changing? Thanks Helen
0
2145
by: dnphamus13 | last post by:
I'm new to this and drowning right now. I would like to put my database online for viewing. I managed to do the filtering but i need to do PAGING as the XML doc get bigger. From what i understand this is what I need to do; transform the current XML doc with the filterring xsl, then somehow add the paging xsl. That's the part i'm having trouble...
0
7882
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7808
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8312
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8181
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6564
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.